* [PATCH] mmc: mediatek: Fixed size in dma_free_coherent
@ 2017-05-24 7:53 Neil Armstrong
2017-05-29 14:43 ` Ulf Hansson
0 siblings, 1 reply; 2+ messages in thread
From: Neil Armstrong @ 2017-05-24 7:53 UTC (permalink / raw)
To: ulf.hansson, matthias.bgg
Cc: Phong LE, linux-mmc, linux-arm-kernel, linux-mediatek,
linux-kernel, Neil Armstrong
From: Phong LE <ple@baylibre.com>
The dma gpd dma_free_coherent call size in invalid.
Fixes: 208489032bdd ("mmc: mediatek: Add Mediatek MMC driver")
Signed-off-by: Phong LE <ple@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
drivers/mmc/host/mtk-sd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
index 5c1e178..5a672a5 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -1774,7 +1774,7 @@ static int msdc_drv_remove(struct platform_device *pdev)
pm_runtime_disable(host->dev);
pm_runtime_put_noidle(host->dev);
dma_free_coherent(&pdev->dev,
- sizeof(struct mt_gpdma_desc),
+ 2 * sizeof(struct mt_gpdma_desc),
host->dma.gpd, host->dma.gpd_addr);
dma_free_coherent(&pdev->dev, MAX_BD_NUM * sizeof(struct mt_bdma_desc),
host->dma.bd, host->dma.bd_addr);
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mmc: mediatek: Fixed size in dma_free_coherent
2017-05-24 7:53 [PATCH] mmc: mediatek: Fixed size in dma_free_coherent Neil Armstrong
@ 2017-05-29 14:43 ` Ulf Hansson
0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2017-05-29 14:43 UTC (permalink / raw)
To: Neil Armstrong
Cc: Matthias Brugger, Phong LE, linux-mmc@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-mediatek,
linux-kernel@vger.kernel.org
On 24 May 2017 at 09:53, Neil Armstrong <narmstrong@baylibre.com> wrote:
> From: Phong LE <ple@baylibre.com>
>
> The dma gpd dma_free_coherent call size in invalid.
>
> Fixes: 208489032bdd ("mmc: mediatek: Add Mediatek MMC driver")
> Signed-off-by: Phong LE <ple@baylibre.com>
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Thanks, applied for next!
Kind regards
Uffe
> ---
> drivers/mmc/host/mtk-sd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
> index 5c1e178..5a672a5 100644
> --- a/drivers/mmc/host/mtk-sd.c
> +++ b/drivers/mmc/host/mtk-sd.c
> @@ -1774,7 +1774,7 @@ static int msdc_drv_remove(struct platform_device *pdev)
> pm_runtime_disable(host->dev);
> pm_runtime_put_noidle(host->dev);
> dma_free_coherent(&pdev->dev,
> - sizeof(struct mt_gpdma_desc),
> + 2 * sizeof(struct mt_gpdma_desc),
> host->dma.gpd, host->dma.gpd_addr);
> dma_free_coherent(&pdev->dev, MAX_BD_NUM * sizeof(struct mt_bdma_desc),
> host->dma.bd, host->dma.bd_addr);
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-05-29 14:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-24 7:53 [PATCH] mmc: mediatek: Fixed size in dma_free_coherent Neil Armstrong
2017-05-29 14:43 ` Ulf Hansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox