mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Possible cut'n'paste error in linux-6.5/drivers/thunderbolt/tmu.c
@ 2023-08-31 11:02 David Binderman
  2023-08-31 11:16 ` mika.westerberg
  0 siblings, 1 reply; 2+ messages in thread
From: David Binderman @ 2023-08-31 11:02 UTC (permalink / raw)
  To: andreas.noever, michael.jamet, mika.westerberg, YehezkelShB,
	linux-usb, Linux Kernel Mailing List

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;

Regards

David Binderman

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-08-31 11:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-31 11:02 Possible cut'n'paste error in linux-6.5/drivers/thunderbolt/tmu.c David Binderman
2023-08-31 11:16 ` mika.westerberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®