[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220328141944.GT3293@kadam>
Date: Mon, 28 Mar 2022 17:19:45 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Xiaomeng Tong <xiam0nd.tong@...il.com>
Cc: vaibhav.sr@...il.com, mgreer@...malcreek.com, johan@...nel.org,
elder@...nel.org, gregkh@...uxfoundation.org,
greybus-dev@...ts.linaro.org, linux-staging@...ts.linux.dev,
linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH] greybus: audio_codec: fix three missing initializers for
data
On Sun, Mar 27, 2022 at 02:01:20PM +0800, Xiaomeng Tong wrote:
> These three bugs are here:
> struct gbaudio_data_connection *data;
>
> If the list '&codec->module_list' is empty then the 'data' will
> keep unchanged.
All three of these functions check for if the codec->module_list is
empty at the start of the function so these are not real bugs.
Smatch is supposed to be able to figure this out, but apparently that
code is broken so Smatch still prints a warning. :(
Apparently GCC does not print a warning for this. Even when I delete
the check for list_empty() then GCC does not print a warning. GCC often
assumes that we enter loops one time. I haven't looked at that, but I
have noticed it in reviewing Smatch vs GCC warnings.
Generally we do not apply static checker work arounds.
I do not have a problem with this particular work around, but it needs
an updated commit message which says it is just to silence static
checker warnings and not to fix bugs. Remove the Fixes tag. Don't CC
stable.
regards,
dan carpenter
Powered by blists - more mailing lists