]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mmc: sdhci: remove unneeded casts
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 14 Feb 2020 07:40:24 +0000 (16:40 +0900)
committerPeng Fan <peng.fan@nxp.com>
Thu, 20 Feb 2020 07:09:56 +0000 (15:09 +0800)
host->mmc is already (struct mmc *).

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

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

index fefe81016eb1d0d808465eb241381de0d0368f7a..ee54d78a28f208db37ca5b9be15918707d581c28 100644 (file)
@@ -522,7 +522,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