linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mmc:cavium-octeon: remove nonsense variable coercion
@ 2020-03-27  4:36 Tang Bin
  2020-03-27 12:27 ` Ulf Hansson
  0 siblings, 1 reply; 2+ messages in thread
From: Tang Bin @ 2020-03-27  4:36 UTC (permalink / raw)
  To: rrichter, ulf.hansson; +Cc: linux-mmc, linux-kernel, Tang Bin

In this function, the variable 'base' is already 'void __iomem *base',
and the return function 'devm_platform_ioremap_resource()' also returns
this type, so the mandatory definition here is redundant.

Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
---
 drivers/mmc/host/cavium-octeon.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/cavium-octeon.c b/drivers/mmc/host/cavium-octeon.c
index 916746c6c..e299cdd1e 100644
--- a/drivers/mmc/host/cavium-octeon.c
+++ b/drivers/mmc/host/cavium-octeon.c
@@ -207,13 +207,13 @@ static int octeon_mmc_probe(struct platform_device *pdev)
 	base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(base))
 		return PTR_ERR(base);
-	host->base = (void __iomem *)base;
+	host->base = base;
 	host->reg_off = 0;
 
 	base = devm_platform_ioremap_resource(pdev, 1);
 	if (IS_ERR(base))
 		return PTR_ERR(base);
-	host->dma_base = (void __iomem *)base;
+	host->dma_base = base;
 	/*
 	 * To keep the register addresses shared we intentionaly use
 	 * a negative offset here, first register used on Octeon therefore
-- 
2.20.1.windows.1




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mmc:cavium-octeon: remove nonsense variable coercion
  2020-03-27  4:36 [PATCH] mmc:cavium-octeon: remove nonsense variable coercion Tang Bin
@ 2020-03-27 12:27 ` Ulf Hansson
  0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2020-03-27 12:27 UTC (permalink / raw)
  To: Tang Bin; +Cc: rrichter, linux-mmc, Linux Kernel Mailing List

On Fri, 27 Mar 2020 at 05:36, Tang Bin <tangbin@cmss.chinamobile.com> wrote:
>
> In this function, the variable 'base' is already 'void __iomem *base',
> and the return function 'devm_platform_ioremap_resource()' also returns
> this type, so the mandatory definition here is redundant.
>
> Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>

Applied for next, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/host/cavium-octeon.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/cavium-octeon.c b/drivers/mmc/host/cavium-octeon.c
> index 916746c6c..e299cdd1e 100644
> --- a/drivers/mmc/host/cavium-octeon.c
> +++ b/drivers/mmc/host/cavium-octeon.c
> @@ -207,13 +207,13 @@ static int octeon_mmc_probe(struct platform_device *pdev)
>         base = devm_platform_ioremap_resource(pdev, 0);
>         if (IS_ERR(base))
>                 return PTR_ERR(base);
> -       host->base = (void __iomem *)base;
> +       host->base = base;
>         host->reg_off = 0;
>
>         base = devm_platform_ioremap_resource(pdev, 1);
>         if (IS_ERR(base))
>                 return PTR_ERR(base);
> -       host->dma_base = (void __iomem *)base;
> +       host->dma_base = base;
>         /*
>          * To keep the register addresses shared we intentionaly use
>          * a negative offset here, first register used on Octeon therefore
> --
> 2.20.1.windows.1
>
>
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-27 12:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-27  4:36 [PATCH] mmc:cavium-octeon: remove nonsense variable coercion Tang Bin
2020-03-27 12:27 ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).