mmc: sdhci: remove unneeded casts 59/268159/2
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 14 Feb 2020 07:40:24 +0000 (16:40 +0900)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Thu, 16 Dec 2021 16:18:05 +0000 (17:18 +0100)
host->mmc is already (struct mmc *).

memalign() returns an opaque pointer, so there is no need for casting.

Change-Id: Ib41d929fac5145ed8b5bcad93d15ff5ca2541fa8
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
drivers/mmc/sdhci.c

index be7ec0aba8b9d83289a12d3ccfc2bacb14f895a4..21cb0ce7c7384a35805a6c94835e06d2b7676b06 100644 (file)
@@ -523,7 +523,7 @@ static void sdhci_set_power(struct sdhci_host *host, unsigned short power)
 
 void sdhci_set_uhs_timing(struct sdhci_host *host)
 {
-       struct mmc *mmc = (struct mmc *)host->mmc;
+       struct mmc *mmc = host->mmc;
        u32 reg;
 
        reg = sdhci_readw(host, SDHCI_HOST_CONTROL2);
@@ -735,8 +735,7 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host,
                       __func__);
                return -EINVAL;
        }
-       host->adma_desc_table = (struct sdhci_adma_desc *)
-                               memalign(ARCH_DMA_MINALIGN, ADMA_TABLE_SZ);
+       host->adma_desc_table = memalign(ARCH_DMA_MINALIGN, ADMA_TABLE_SZ);
 
        host->adma_addr = (dma_addr_t)host->adma_desc_table;
 #ifdef CONFIG_DMA_ADDR_T_64BIT