[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230831111655.GP3465@black.fi.intel.com>
Date: Thu, 31 Aug 2023 14:16:55 +0300
From: "mika.westerberg@...ux.intel.com" <mika.westerberg@...ux.intel.com>
To: David Binderman <dcb314@...mail.com>
Cc: "andreas.noever@...il.com" <andreas.noever@...il.com>,
"michael.jamet@...el.com" <michael.jamet@...el.com>,
"YehezkelShB@...il.com" <YehezkelShB@...il.com>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: Possible cut'n'paste error in linux-6.5/drivers/thunderbolt/tmu.c
Hi,
On Thu, Aug 31, 2023 at 11:02:58AM +0000, David Binderman wrote:
> Hello there,
>
> I just tried out static analyser cppcheck on linux-6.5. It said:
>
> linux-6.5/drivers/thunderbolt/tmu.c:385:50: style: Expression is always false because 'else if' condition matches previous condition at line 383. [multiCondition]
>
> Source code is
>
> if (tmu_rates[TB_SWITCH_TMU_MODE_LOWRES] == rate)
> sw->tmu.mode = TB_SWITCH_TMU_MODE_LOWRES;
> else if (tmu_rates[TB_SWITCH_TMU_MODE_LOWRES] == rate)
> sw->tmu.mode = TB_SWITCH_TMU_MODE_HIFI_UNI;
>
Thanks for the report. Indeed, this should be
else if (tmu_rates[TB_SWITCH_TMU_MODE_HIFI_UNI] == rate)
sw->tmu.mode = TB_SWITCH_TMU_MODE_HIFI_UNI;
I will fix it up and send out after v6.6-rc1 is released.
Powered by blists - more mailing lists