From: Christoph Hellwig <hch@infradead.org>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Gilad Ben-Yossef <gilad@benyossef.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-crypto@vger.kernel.org
Subject: Re: [PATCH] crypto: ccree - Remove a useless dma_supported() call
Date: Tue, 19 Jul 2022 22:21:45 -0700 [thread overview]
Message-ID: <YteQ6Vx2C03UtCkG@infradead.org> (raw)
In-Reply-To: <ef6f884ef144390f152c34d2f549b1f50303b7b1.1658262447.git.christophe.jaillet@wanadoo.fr>
On Tue, Jul 19, 2022 at 10:27:50PM +0200, Christophe JAILLET wrote:
> There is no point in calling dma_supported() before calling
> dma_set_coherent_mask(). This function already calls dma_supported() and
> returns an error (-EIO) if it fails.
>
> So remove the superfluous dma_supported() call.
>
> While at it, fix the name of the function reported in a dev_err().
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> I guess that the whole while loop could be removed, but I don't remind the
> thread with the corresponding explanation, so leave it as-is :(
The loop should go away. Setting a larger DMA mask will never fail when
setting a smaller one will succeed.
Also after this patch dma_supported can be marked static (Yay!)
next prev parent reply other threads:[~2022-07-20 5:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-19 20:27 [PATCH] crypto: ccree - Remove a useless dma_supported() call Christophe JAILLET
2022-07-20 5:21 ` Christoph Hellwig [this message]
2022-07-20 9:24 ` Gilad Ben-Yossef
2022-07-20 9:36 ` Christophe JAILLET
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=YteQ6Vx2C03UtCkG@infradead.org \
--to=hch@infradead.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=davem@davemloft.net \
--cc=gilad@benyossef.com \
--cc=herbert@gondor.apana.org.au \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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