Message ID | 20200214074027.19824-9-yamada.masahiro@socionext.com |
---|---|
State | Accepted |
Commit | fdd84c8be40b8f31445d8f4b2e907c7e24e2e3f9 |
Headers | show |
Series | mmc: sdhci: code clean-up and fix cache coherency problem | expand |
On 2/14/20 4:40 PM, Masahiro Yamada wrote: > 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 at socionext.com> Reviewed-by: Jaehoon Chung <jh80.chung at samsung.com> Best Regards, Jaehoon Chung > --- > > Changes in v3: None > Changes in v2: None > > drivers/mmc/sdhci.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c > index fefe81016eb1..ee54d78a28f2 100644 > --- a/drivers/mmc/sdhci.c > +++ b/drivers/mmc/sdhci.c > @@ -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 >
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index fefe81016eb1..ee54d78a28f2 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c @@ -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
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 at socionext.com> --- Changes in v3: None Changes in v2: None drivers/mmc/sdhci.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)