[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 000/141] Fix fall-through warnings for Clang
 
- To: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
 
- From: Miguel Ojeda <miguel.ojeda.sandonis@xxxxxxxxx>
 
- Date: Thu, 26 Nov 2020 18:05:45 +0100
 
- Cc: Edward Cree <ecree.xilinx@xxxxxxxxx>, 	ALSA Development Mailing List <alsa-devel@xxxxxxxxxxxxxxxx>, linux-atm-general@xxxxxxxxxxxxxxxxxxxxx, 	reiserfs-devel@xxxxxxxxxxxxxxx, linux-iio@xxxxxxxxxxxxxxx, 	linux-wireless <linux-wireless@xxxxxxxxxxxxxxx>, 	Linux Fbdev development list <linux-fbdev@xxxxxxxxxxxxxxx>, dri-devel <dri-devel@xxxxxxxxxxxxxxxxxxxxx>, 	"Gustavo A. R. Silva" <gustavoars@xxxxxxxxxx>, 	James Bottomley <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx>, linux-ide@xxxxxxxxxxxxxxx, 	dm-devel@xxxxxxxxxx, keyrings@xxxxxxxxxxxxxxx, 	MTD Maling List <linux-mtd@xxxxxxxxxxxxxxxxxxx>, GR-everest-linux-l2@xxxxxxxxxxx, 	wcn36xx@xxxxxxxxxxxxxxxxxxx, samba-technical@xxxxxxxxxxxxxxx, 	linux-i3c@xxxxxxxxxxxxxxxxxxx, linux1394-devel@xxxxxxxxxxxxxxxxxxxxx, 	linux-afs@xxxxxxxxxxxxxxxxxxx, usb-storage@xxxxxxxxxxxxxxxxxxxxxxxx, 	Lars Ellenberg <drbd-dev@xxxxxxxxxxxxxxxx>, driverdevel <devel@xxxxxxxxxxxxxxxxxxxx>, 	linux-cifs@xxxxxxxxxxxxxxx, rds-devel@xxxxxxxxxxxxxx, 	Nick Desaulniers <ndesaulniers@xxxxxxxxxx>, scsi <linux-scsi@xxxxxxxxxxxxxxx>, 	Nathan Chancellor <natechancellor@xxxxxxxxx>, linux-rdma <linux-rdma@xxxxxxxxxxxxxxx>, 	oss-drivers@xxxxxxxxxxxxx, bridge@xxxxxxxxxxxxxxxxxxxxxxxxxx, 	linux-security-module <linux-security-module@xxxxxxxxxxxxxxx>, 	amd-gfx list <amd-gfx@xxxxxxxxxxxxxxxxxxxxx>, linux-stm32@xxxxxxxxxxxxxxxxxxxxxxxxxxxx, 	cluster-devel@xxxxxxxxxx, ACPI Devel Maling List <linux-acpi@xxxxxxxxxxxxxxx>, 	coreteam@xxxxxxxxxxxxx, intel-wired-lan@xxxxxxxxxxxxxxxx, 	linux-input <linux-input@xxxxxxxxxxxxxxx>, Miguel Ojeda <ojeda@xxxxxxxxxx>, 	Jakub Kicinski <kuba@xxxxxxxxxx>, Ext4 Developers List <linux-ext4@xxxxxxxxxxxxxxx>, 	Linux Media Mailing List <linux-media@xxxxxxxxxxxxxxx>, Kees Cook <keescook@xxxxxxxxxxxx>, 	selinux@xxxxxxxxxxxxxxx, linux-arm-msm <linux-arm-msm@xxxxxxxxxxxxxxx>, 	Intel Graphics Development <intel-gfx@xxxxxxxxxxxxxxxxxxxxx>, linux-geode@xxxxxxxxxxxxxxxxxxx, 	linux-can@xxxxxxxxxxxxxxx, linux-block@xxxxxxxxxxxxxxx, 	"open list:GPIO SUBSYSTEM" <linux-gpio@xxxxxxxxxxxxxxx>, op-tee@xxxxxxxxxxxxxxxxxxxxxxxxx, 	linux-mediatek@xxxxxxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, 	Nouveau Dev <nouveau@xxxxxxxxxxxxxxxxxxxxx>, linux-hams@xxxxxxxxxxxxxxx, 	ceph-devel <ceph-devel@xxxxxxxxxxxxxxx>, virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx, 	Linux ARM <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, linux-hwmon@xxxxxxxxxxxxxxx, 	Linux Watchdog Mailing List <linux-watchdog@xxxxxxxxxxxxxxx>, 	"open list:NFS, SUNRPC, AND..." <linux-nfs@xxxxxxxxxxxxxxx>, GR-Linux-NIC-Dev@xxxxxxxxxxx, 	tipc-discussion@xxxxxxxxxxxxxxxxxxxxx, Linux-MM <linux-mm@xxxxxxxxx>, 	Network Development <netdev@xxxxxxxxxxxxxxx>, linux-decnet-user@xxxxxxxxxxxxxxxxxxxxx, 	Linux MMC List <linux-mmc@xxxxxxxxxxxxxxx>, linux-kernel <linux-kernel@xxxxxxxxxxxxxxx>, 	"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@xxxxxxxxxx>, Linux-Renesas <linux-renesas-soc@xxxxxxxxxxxxxxx>, 	linux-sctp@xxxxxxxxxxxxxxx, USB list <linux-usb@xxxxxxxxxxxxxxx>, 	NetFilter <netfilter-devel@xxxxxxxxxxxxxxx>, 	Linux Crypto Mailing List <linux-crypto@xxxxxxxxxxxxxxx>, patches@xxxxxxxxxxxxxxxxxxxxx, 	Joe Perches <joe@xxxxxxxxxxx>, linux-integrity <linux-integrity@xxxxxxxxxxxxxxx>, 	target-devel <target-devel@xxxxxxxxxxxxxxx>, linux-hardening@xxxxxxxxxxxxxxx
 
- Delivery-date: Thu, 26 Nov 2020 17:06:00 +0000
 
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
 
 
 
On Thu, Nov 26, 2020 at 4:28 PM Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote:
>
> The maintainer is not necessarily the owner/author of the code, and
> thus may not know the intent of the code.
Agreed, I was not blaming maintainers -- just trying to point out that
the problem is there :-)
In those cases, it is still very useful: we add the `fallthrough` and
a comment saying `FIXME: fallthrough intended? Figure this out...`.
Thus a previous unknown unknown is now a known unknown. And no new
unknown unknowns will be introduced since we enabled the warning
globally.
> BTW, you cannot mindlessly fix the latter, as you cannot know if
> "(a == b)" or "((a = b))" was intended, without understanding the code
> (and the (possibly unavailable) data sheet, and the hardware, ...).
That's right, I was referring to the cases where the compiler saves
someone time from a typo they just made.
Cheers,
Miguel
 
 
    
     |