lkml.org 
[lkml]   [2022]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@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!)

\
 
 \ /
  Last update: 2022-07-20 07:22    [W:0.058 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site