From: Tony Lindgren <tony@atomide.com>
To: Russell King <rmk+kernel@armlinux.org.uk>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>,
Ulf Hansson <ulf.hansson@linaro.org>,
linux-omap@vger.kernel.org, linux-mmc@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] mmc: omap_hsmmc: fix DMA API warning
Date: Tue, 11 Dec 2018 07:04:12 -0800 [thread overview]
Message-ID: <20181211150412.GP6707@atomide.com> (raw)
In-Reply-To: <E1gWjE3-0006mG-2S@rmk-PC.armlinux.org.uk>
Hi,
* Russell King <rmk+kernel@armlinux.org.uk> [181211 14:41]:
> @@ -1939,6 +1938,17 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
> goto err_irq;
> }
>
> + /*
> + * Limit the maximum segment size to the lower of the request size
> + * and the DMA engine device segment size limits. In reality, with
> + * 32-bit transfers, the DMA engine can do longer segments than this
> + * but there is no way to represent that in the DMA model - if we
> + * increase this figure here, we get warnings from the DMA API debug.
> + */
> + mmc->max_seg_size = min(mmc->max_req_size,
> + min(dma_get_max_seg_size(host->rx_chan->device->dev),
> + dma_get_max_seg_size(host->tx_chan->device->dev)));
> +
Looks like using min3() here would be handy?
Regards,
Tony
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2018-12-11 15:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-11 14:41 [PATCH] mmc: omap_hsmmc: fix DMA API warning Russell King
2018-12-11 15:04 ` Tony Lindgren [this message]
2018-12-17 8:07 ` Ulf Hansson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181211150412.GP6707@atomide.com \
--to=tony@atomide.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=peter.ujfalusi@ti.com \
--cc=rmk+kernel@armlinux.org.uk \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).