diff mbox series

mmc: renesas_sdhi: Drop local dma_parms

Message ID 85e1fc97dbec3dea96102785a5e308ccb5e91cfe.1599167798.git.robin.murphy@arm.com (mailing list archive)
State New, archived
Headers show
Series mmc: renesas_sdhi: Drop local dma_parms | expand

Commit Message

Robin Murphy Sept. 3, 2020, 9:18 p.m. UTC
Since commit 9495b7e92f71 ("driver core: platform: Initialize dma_parms
for platform devices"), struct platform_device already provides a
dma_parms structure, so we can save allocating another one.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
---
 drivers/mmc/host/renesas_sdhi_internal_dmac.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Wolfram Sang Sept. 4, 2020, 6:03 a.m. UTC | #1
On Thu, Sep 03, 2020 at 10:18:06PM +0100, Robin Murphy wrote:
> Since commit 9495b7e92f71 ("driver core: platform: Initialize dma_parms
> for platform devices"), struct platform_device already provides a
> dma_parms structure, so we can save allocating another one.
> 
> Signed-off-by: Robin Murphy <robin.murphy@arm.com>

Double-checked the mentioned commit above:

Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

No regression and same performance when checksumming a large file:

Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Thanks for the patch!
Ulf Hansson Sept. 7, 2020, 10:07 a.m. UTC | #2
On Thu, 3 Sep 2020 at 23:18, Robin Murphy <robin.murphy@arm.com> wrote:
>
> Since commit 9495b7e92f71 ("driver core: platform: Initialize dma_parms
> for platform devices"), struct platform_device already provides a
> dma_parms structure, so we can save allocating another one.
>
> Signed-off-by: Robin Murphy <robin.murphy@arm.com>

Applied for next, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/host/renesas_sdhi_internal_dmac.c | 4 ----
>  1 file changed, 4 deletions(-)
>
> diff --git a/drivers/mmc/host/renesas_sdhi_internal_dmac.c b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
> index 32ab991544ef..8ee6b2b85ec2 100644
> --- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c
> +++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
> @@ -336,10 +336,6 @@ static int renesas_sdhi_internal_dmac_probe(struct platform_device *pdev)
>         if (soc)
>                 global_flags |= (unsigned long)soc->data;
>
> -       dev->dma_parms = devm_kzalloc(dev, sizeof(*dev->dma_parms), GFP_KERNEL);
> -       if (!dev->dma_parms)
> -               return -ENOMEM;
> -
>         /* value is max of SD_SECCNT. Confirmed by HW engineers */
>         dma_set_max_seg_size(dev, 0xffffffff);
>
> --
> 2.28.0.dirty
>
diff mbox series

Patch

diff --git a/drivers/mmc/host/renesas_sdhi_internal_dmac.c b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
index 32ab991544ef..8ee6b2b85ec2 100644
--- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c
+++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
@@ -336,10 +336,6 @@  static int renesas_sdhi_internal_dmac_probe(struct platform_device *pdev)
 	if (soc)
 		global_flags |= (unsigned long)soc->data;
 
-	dev->dma_parms = devm_kzalloc(dev, sizeof(*dev->dma_parms), GFP_KERNEL);
-	if (!dev->dma_parms)
-		return -ENOMEM;
-
 	/* value is max of SD_SECCNT. Confirmed by HW engineers */
 	dma_set_max_seg_size(dev, 0xffffffff);