[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y1gWbN2/Tbf1jeL6@sirena.org.uk>
Date: Tue, 25 Oct 2022 18:01:32 +0100
From: Mark Brown <broonie@...nel.org>
To: wangkailong@...i.cn
Cc: perex@...ex.cz, tiwai@...e.com, lgirdwood@...il.com,
motolav@...il.com, cezary.rojewski@...el.com, mkumard@...dia.com,
pierre-louis.bossart@...ux.intel.com, kai.vehmanen@...ux.intel.com,
peter.ujfalusi@...ux.intel.com, alsa-devel@...a-project.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ALSA/ASoC: replace ternary operator with min()
On Tue, Oct 25, 2022 at 10:56:11PM +0800, wangkailong@...i.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.
Download attachment "signature.asc" of type "application/pgp-signature" (485 bytes)
Powered by blists - more mailing lists