Hi Shimoda-san,
On Thu, Jun 28, 2018 at 1:53 PM Yoshihiro Shimoda
<[email protected]> wrote:
> This patch fixes an issue that lacks the dma_unmap_sg() calling in
> the error patch of renesas_sdhi_internal_dmac_start_dma().
Nice catch!
Thanks for your patch!
> Fixes: 0cbc94daa554 ("mmc: renesas_sdhi_internal_dmac: limit DMA RX for old
> SoCs")
> Cc: <[email protected]> # v4.17+
> Signed-off-by: Yoshihiro Shimoda <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
> --- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c
> +++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
> @@ -173,8 +173,11 @@
> if (data->flags & MMC_DATA_READ) {
> dtran_mode |= DTRAN_MODE_CH_NUM_CH1;
> if (test_bit(SDHI_INTERNAL_DMAC_ONE_RX_ONLY, &global_flags) &&
> - test_and_set_bit(SDHI_INTERNAL_DMAC_RX_IN_USE,
> &global_flags))
> + test_and_set_bit(SDHI_INTERNAL_DMAC_RX_IN_USE,
> &global_flags)) {
> + dma_unmap_sg(&host->pdev->dev, sg, host->sg_len,
> + mmc_get_dma_dir(data));
Given there is already a call to dma_unmap_sg() a few lines earlier , you
may want to introduce a new label before force_pio, and move the call to
dma_unmap_sg() there.
> goto force_pio;
> + }
> } else {
> dtran_mode |= DTRAN_MODE_CH_NUM_CH0;
> }
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds