Thread (68 messages) 68 messages, 21 authors, 2021-04-20

Re: [Intel-wired-lan] [PATCH 000/141] Fix fall-through warnings for Clang

From: Finn Thain <hidden>
Date: 2020-11-24 22:24:38
Also in: amd-gfx, bridge, ceph-devel, dm-devel, dri-devel, intel-gfx, intel-wired-lan, keyrings, linux-acpi, linux-arm-msm, linux-block, linux-can, linux-cifs, linux-crypto, linux-ext4, linux-fbdev, linux-gpio, linux-hardening, linux-hwmon, linux-i3c, linux-ide, linux-iio, linux-input, linux-integrity, linux-media, linux-mediatek, linux-mm, linux-mmc, linux-nfs, linux-rdma, linux-renesas-soc, linux-scsi, linux-sctp, linux-usb, linux-watchdog, linux-wireless, lkml, netdev, netfilter-devel, op-tee, selinux, target-devel, xen-devel

On Tue, 24 Nov 2020, Kees Cook wrote:
On Mon, Nov 23, 2020 at 08:31:30AM -0800, James Bottomley wrote:
quoted
Really, no ... something which produces no improvement has no value at 
all ... we really shouldn't be wasting maintainer time with it because 
it has a cost to merge.  I'm not sure we understand where the balance 
lies in value vs cost to merge but I am confident in the zero value 
case.
What? We can't measure how many future bugs aren't introduced because 
the kernel requires explicit case flow-control statements for all new 
code.
These statements are not "missing" unless you presume that code written 
before the latest de facto language spec was written should somehow be 
held to that spec.

If the 'fallthrough' statement is not part of the latest draft spec then 
we should ask why not before we embrace it. Being that the kernel still 
prefers -std=gnu89 you might want to consider what has prevented 
-std=gnu99 or -std=gnu2x etc.
We already enable -Wimplicit-fallthrough globally, so that's not the 
discussion. The issue is that Clang is (correctly) even more strict than 
GCC for this, so these are the remaining ones to fix for full Clang 
coverage too.
Seems to me you should be patching the compiler.

When you have consensus among the language lawyers you'll have more 
credibility with those being subjected to enforcement.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help