Re: linux-next: build warning after merge of the fbdev tree

From: Tom Li
Date: Tue Apr 02 2019 - 08:39:06 EST


On Tue, Apr 02, 2019 at 09:30:07AM +1100, Stephen Rothwell wrote:
> Hi Bartlomiej,
>
> After merging the fbdev tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
>
> drivers/video/fbdev/sm712fb.c: In function 'smtc_blank':
> drivers/video/fbdev/sm712fb.c:900:4: warning: this statement may fall through [-Wimplicit-fallthrough=]
> smtc_seqw(0x6b, 0x02);
> ^~~~~~~~~~~~~~~~~~~~~
> drivers/video/fbdev/sm712fb.c:901:3: note: here
> case 0x720:
> ^~~~
>
> Introduced by commit
>
> f627caf55b8e ("fbdev: sm712fb: fix crashes and garbled display during DPMS modesetting")
>

Nice catch! Thanks!

This bug was introduced by me while attempting to fix another issue, a result of
my copy-paste error. Since it only reprograms the clock to a different frequency,
it's only a benign issue without visible side-effect, so it also evaded Sudip
Mukherjee's code review and regression tests.

But what's I'm more concerned here is the failure of scripts/checkpatch.pl. I
thought ./checkpatch.pl should have caught it, but for some reasons it cannot
detect this one.

$ ./scripts/checkpatch.pl 0001-fbdev-sm712fb-fix-crashes-and-garbled-display-during.patch
total: 0 errors, 0 warnings, 105 lines checked

So I mistakenly assumed the patch doesn't have a problem... It seems checkpatch.pl
cannot detect fallthroughs in nested switch/case statements? I'm not sure. Should I
report it to the maintainers of checkpatch.pl?

Anyway, please apply the following patch ASAP.

Thanks,
Tom Li