From: Herbert Xu <herbert@gondor.apana.org.au>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Gilad Ben-Yossef <gilad@benyossef.com>,
"David S. Miller" <davem@davemloft.net>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
Christoph Hellwig <hch@infradead.org>,
linux-crypto@vger.kernel.org
Subject: Re: [PATCH v2] crypto: ccree - Remove a useless dma_supported() call
Date: Fri, 29 Jul 2022 18:35:41 +0800 [thread overview]
Message-ID: <YuO3/faROPV6p4sU@gondor.apana.org.au> (raw)
In-Reply-To: <f47cdaa7067af0ae2eeeca52cee2176cdc449a22.1658323697.git.christophe.jaillet@wanadoo.fr>
On Wed, Jul 20, 2022 at 03:28:44PM +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.
>
> Moreover, setting a larger DMA mask will never fail when setting a smaller
> one will succeed, so the whole "while" loop can be removed as well. (see
> [1])
>
> While at it, fix the name of the function reported in a dev_err().
>
> [1]: https://lore.kernel.org/all/YteQ6Vx2C03UtCkG@infradead.org/
>
> Suggested-by: Christoph Hellwig <hch@infradead.org>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> drivers/crypto/ccree/cc_driver.c | 13 +++----------
> 1 file changed, 3 insertions(+), 10 deletions(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
prev parent reply other threads:[~2022-07-29 10:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-20 13:28 Christophe JAILLET
2022-07-20 15:31 ` Gilad Ben-Yossef
2022-07-29 10:35 ` Herbert Xu [this message]
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=YuO3/faROPV6p4sU@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=christophe.jaillet@wanadoo.fr \
--cc=davem@davemloft.net \
--cc=gilad@benyossef.com \
--cc=hch@infradead.org \
--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
all inboxes | Powered by JetHome®