lkml.org 
[lkml]   [2022]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ALSA/ASoC: replace ternary operator with min()
On Tue, Oct 25, 2022 at 10:56:11PM +0800, wangkailong@jari.cn wrote:
> Fix the following coccicheck warning:
>
> sound/soc/soc-ops.c:817: WARNING opportunity for min()

> kfree(uctl);
> - return err < 0 ? err : 0;
> + return min(err, 0);

I don't think this is a good warning, while I'm no big fan of the
ternery operator the new code is less clear about the intent than the
old code.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2022-10-25 19:02    [W:0.050 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site