lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YteQ6Vx2C03UtCkG@infradead.org>
Date:   Tue, 19 Jul 2022 22:21:45 -0700
From:   Christoph Hellwig <hch@...radead.org>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc:     Gilad Ben-Yossef <gilad@...yossef.com>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        "David S. Miller" <davem@...emloft.net>,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
        linux-crypto@...r.kernel.org
Subject: Re: [PATCH] crypto: ccree - Remove a useless dma_supported() call

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@...adoo.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!)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ