linux/drivers
Linus Torvalds b4b52b881c Wimplicit-fallthrough patches for 5.2-rc1
Hi Linus,
 
 This is my very first pull-request.  I've been working full-time as
 a kernel developer for more than two years now. During this time I've
 been fixing bugs reported by Coverity all over the tree and, as part
 of my work, I'm also contributing to the KSPP. My work in the kernel
 community has been supervised by Greg KH and Kees Cook.
 
 OK. So, after the quick introduction above, please, pull the following
 patches that mark switch cases where we are expecting to fall through.
 These patches are part of the ongoing efforts to enable -Wimplicit-fallthrough.
 They have been ignored for a long time (most of them more than 3 months,
 even after pinging multiple times), which is the reason why I've created
 this tree. Most of them have been baking in linux-next for a whole development
 cycle. And with Stephen Rothwell's help, we've had linux-next nag-emails
 going out for newly introduced code that triggers -Wimplicit-fallthrough
 to avoid gaining more of these cases while we work to remove the ones
 that are already present.
 
 I'm happy to let you know that we are getting close to completing this
 work.  Currently, there are only 32 of 2311 of these cases left to be
 addressed in linux-next.  I'm auditing every case; I take a look into
 the code and analyze it in order to determine if I'm dealing with an
 actual bug or a false positive, as explained here:
 
 https://lore.kernel.org/lkml/c2fad584-1705-a5f2-d63c-824e9b96cf50@embeddedor.com/
 
 While working on this, I've found and fixed the following missing
 break/return bugs, some of them introduced more than 5 years ago:
 
 84242b82d8
 7850b51b6c
 5e420fe635
 09186e5034
 b5be853181
 7264235ee7
 cc5034a5d2
 479826cc86
 5340f23df8
 df997abeeb
 2f10d82373
 307b00c5e6
 5d25ff7a54
 a7ed5b3e7d
 c24bfa8f21
 ad0eaee619
 9ba8376ce1
 dc586a60a1
 a8e9b186f1
 4e57562b48
 60747828ea
 c5b974bee9
 cc44ba9116
 2c930e3d0a
 
 Once this work is finish, we'll be able to universally enable
 "-Wimplicit-fallthrough" to avoid any of these kinds of bugs from
 entering the kernel again.
 
 Thanks
 
 Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEkmRahXBSurMIg1YvRwW0y0cG2zEFAlzQR2IACgkQRwW0y0cG
 2zEJbQ//X930OcBtT/9DRW4XL1Jeq0Mjssz/GLX2Vpup5CwwcTROG65no80Zezf/
 yQRWnUjGX0OBv/fmUK32/nTxI/7k7NkmIXJHe0HiEF069GEENB7FT6tfDzIPjU8M
 qQkB8NsSUWJs3IH6BVynb/9MGE1VpGBDbYk7CBZRtRJT1RMM+3kQPucgiZMgUBPo
 Yd9zKwn4i/8tcOCli++EUdQ29ukMoY2R3qpK4LftdX9sXLKZBWNwQbiCwSkjnvJK
 I6FDiA7RaWH2wWGlL7BpN5RrvAXp3z8QN/JZnivIGt4ijtAyxFUL/9KOEgQpBQN2
 6TBRhfTQFM73NCyzLgGLNzvd8awem1rKGSBBUvevaPbgesgM+Of65wmmTQRhFNCt
 A7+e286X1GiK3aNcjUKrByKWm7x590EWmDzmpmICxNPdt5DHQ6EkmvBdNjnxCMrO
 aGA24l78tBN09qN45LR7wtHYuuyR0Jt9bCmeQZmz7+x3ICDHi/+Gw7XPN/eM9+T6
 lZbbINiYUyZVxOqwzkYDCsdv9+kUvu3e4rPs20NERWRpV8FEvBIyMjXAg6NAMTue
 K+ikkyMBxCvyw+NMimHJwtD7ho4FkLPcoeXb2ZGJTRHixiZAEtF1RaQ7dA05Q/SL
 gbSc0DgLZeHlLBT+BSWC2Z8SDnoIhQFXW49OmuACwCUC68NHKps=
 =k30z
 -----END PGP SIGNATURE-----

Merge tag 'Wimplicit-fallthrough-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux

Pull Wimplicit-fallthrough updates from Gustavo A. R. Silva:
 "Mark switch cases where we are expecting to fall through.

  This is part of the ongoing efforts to enable -Wimplicit-fallthrough.

  Most of them have been baking in linux-next for a whole development
  cycle. And with Stephen Rothwell's help, we've had linux-next
  nag-emails going out for newly introduced code that triggers
  -Wimplicit-fallthrough to avoid gaining more of these cases while we
  work to remove the ones that are already present.

  We are getting close to completing this work. Currently, there are
  only 32 of 2311 of these cases left to be addressed in linux-next. I'm
  auditing every case; I take a look into the code and analyze it in
  order to determine if I'm dealing with an actual bug or a false
  positive, as explained here:

      https://lore.kernel.org/lkml/c2fad584-1705-a5f2-d63c-824e9b96cf50@embeddedor.com/

  While working on this, I've found and fixed the several missing
  break/return bugs, some of them introduced more than 5 years ago.

  Once this work is finished, we'll be able to universally enable
  "-Wimplicit-fallthrough" to avoid any of these kinds of bugs from
  entering the kernel again"

* tag 'Wimplicit-fallthrough-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux: (27 commits)
  memstick: mark expected switch fall-throughs
  drm/nouveau/nvkm: mark expected switch fall-throughs
  NFC: st21nfca: Fix fall-through warnings
  NFC: pn533: mark expected switch fall-throughs
  block: Mark expected switch fall-throughs
  ASN.1: mark expected switch fall-through
  lib/cmdline.c: mark expected switch fall-throughs
  lib: zstd: Mark expected switch fall-throughs
  scsi: sym53c8xx_2: sym_nvram: Mark expected switch fall-through
  scsi: sym53c8xx_2: sym_hipd: mark expected switch fall-throughs
  scsi: ppa: mark expected switch fall-through
  scsi: osst: mark expected switch fall-throughs
  scsi: lpfc: lpfc_scsi: Mark expected switch fall-throughs
  scsi: lpfc: lpfc_nvme: Mark expected switch fall-through
  scsi: lpfc: lpfc_nportdisc: Mark expected switch fall-through
  scsi: lpfc: lpfc_hbadisc: Mark expected switch fall-throughs
  scsi: lpfc: lpfc_els: Mark expected switch fall-throughs
  scsi: lpfc: lpfc_ct: Mark expected switch fall-throughs
  scsi: imm: mark expected switch fall-throughs
  scsi: csiostor: csio_wr: mark expected switch fall-through
  ...
2019-05-07 12:48:10 -07:00
..
accessibility
acpi Printk changes for 5.2 2019-05-07 09:18:12 -07:00
amba ARM: 8836/1: drivers: amba: Update component matching to use the CoreSight UCI values. 2019-02-26 11:23:49 +00:00
android binder: fix race between munmap() and direct reclaim 2019-03-21 06:51:32 +01:00
ata libata: fix using DMA buffers on stack 2019-03-28 08:16:04 -06:00
atm firestream: fix spelling mistake "tramsitted" -> "transmitted" 2019-04-18 11:38:22 -07:00
auxdisplay auxdisplay: charlcd: make backlight initial state configurable 2019-03-17 08:48:45 +01:00
base pidfd patches for v5.2-rc1 2019-05-07 12:30:24 -07:00
bcma
block Wimplicit-fallthrough patches for 5.2-rc1 2019-05-07 12:48:10 -07:00
bluetooth Bluetooth: btusb: request wake pin with NOAUTOEN 2019-04-09 17:38:24 -10:00
bus ARM: SoC driver updates for 5.1 2019-03-06 09:41:12 -08:00
cdrom
char pidfd patches for v5.2-rc1 2019-05-07 12:30:24 -07:00
clk Allwinner clocks fixes for 5.1 2019-04-19 13:06:58 -07:00
clocksource arm64 updates for 5.2 2019-05-06 17:54:22 -07:00
connector connector: fix unsafe usage of ->real_parent 2019-03-08 15:06:38 -08:00
cpufreq Printk changes for 5.2 2019-05-07 09:18:12 -07:00
cpuidle cpuidle: Export the next timer expiration for CPUs 2019-04-10 00:32:34 +02:00
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2019-05-06 20:15:06 -07:00
dax dax: make use of ->free_inode() 2019-05-01 22:43:26 -04:00
dca
devfreq PM / devfreq: add tracing for scheduling work 2019-04-16 09:29:18 +09:00
dio
dma Remove Mysterious Macro Intended to Obscure Weird Behaviours (mmiowb()) 2019-05-06 16:57:52 -07:00
dma-buf Make anon_inodes unconditional 2019-04-19 14:03:11 +02:00
edac Merge branch 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-05-06 19:54:57 -07:00
eisa
extcon Merge branches 'acpi-utils', 'acpi-video', 'acpi-soc' and 'acpi-button' 2019-05-06 10:50:08 +02:00
firewire stream_open related patches for Linux 5.2 2019-05-07 12:15:13 -07:00
firmware Power management updates for 5.2-rc1 2019-05-06 19:40:31 -07:00
fmc
fpga
fsi
gnss *: convert stream-like files from nonseekable_open -> stream_open 2019-05-06 17:46:41 +03:00
gpio pidfd patches for v5.2-rc1 2019-05-07 12:30:24 -07:00
gpu Wimplicit-fallthrough patches for 5.2-rc1 2019-05-07 12:48:10 -07:00
hid stream_open related patches for Linux 5.2 2019-05-07 12:15:13 -07:00
hsi
hv Char/Misc driver patches for 5.1-rc1 2019-03-06 14:18:59 -08:00
hwmon stream_open related patches for Linux 5.2 2019-05-07 12:15:13 -07:00
hwspinlock
hwtracing ARM updates for 5.1-rc1 2019-03-15 14:37:46 -07:00
i2c Merge branch 'i2c/for-current-fixed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2019-05-03 11:42:01 -07:00
i3c * Fix a shift wrap bug in the core 2019-05-07 08:50:40 -07:00
ide drivers: Remove explicit invocations of mmiowb() 2019-04-08 12:01:02 +01:00
idle
iio pidfd patches for v5.2-rc1 2019-05-07 12:30:24 -07:00
infiniband pidfd patches for v5.2-rc1 2019-05-07 12:30:24 -07:00
input *: convert stream-like files from nonseekable_open -> stream_open 2019-05-06 17:46:41 +03:00
interconnect
iommu iommu/amd: Set exclusion range correctly 2019-04-12 12:59:45 +02:00
ipack
irqchip A couple more MIPS fixes: 2019-04-22 11:54:47 -07:00
isdn *: convert stream-like files from nonseekable_open -> stream_open 2019-05-06 17:46:41 +03:00
leds *: convert stream-like files from nonseekable_open -> stream_open 2019-05-06 17:46:41 +03:00
lightnvm lightnvm: pblk: fix crash in pblk_end_partial_read due to multipage bvecs 2019-04-10 12:17:01 -06:00
macintosh treewide: add checks for the return value of memblock_alloc*() 2019-03-12 10:04:02 -07:00
mailbox mailbox: imx: keep MU irq working during suspend/resume 2019-03-11 02:51:43 -05:00
mcb
md Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2019-05-06 20:15:06 -07:00
media stream_open related patches for Linux 5.2 2019-05-07 12:15:13 -07:00
memory
memstick Wimplicit-fallthrough patches for 5.2-rc1 2019-05-07 12:48:10 -07:00
message
mfd Merge branch 'regulator-5.2' into regulator-next 2019-05-06 22:52:14 +09:00
misc Remove Mysterious Macro Intended to Obscure Weird Behaviours (mmiowb()) 2019-05-06 16:57:52 -07:00
mmc Printk changes for 5.2 2019-05-07 09:18:12 -07:00
mtd Remove Mysterious Macro Intended to Obscure Weird Behaviours (mmiowb()) 2019-05-06 16:57:52 -07:00
mux
net Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2019-05-06 20:15:06 -07:00
nfc Wimplicit-fallthrough patches for 5.2-rc1 2019-05-07 12:48:10 -07:00
ntb drivers: Remove explicit invocations of mmiowb() 2019-04-08 12:01:02 +01:00
nubus
nvdimm Printk changes for 5.2 2019-05-07 09:18:12 -07:00
nvme Merge branch 'for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu 2019-04-18 14:42:24 +02:00
nvmem Char/Misc driver patches for 5.1-rc1 2019-03-06 14:18:59 -08:00
of of_net: Fix residues after of_get_nvmem_mac_address removal 2019-04-19 11:58:30 -07:00
opp OPP: Introduce dev_pm_opp_find_freq_ceil_by_volt() 2019-04-10 12:13:31 +05:30
oprofile
parisc Revert: parisc: Use F_EXTEND() macro in iosapic code 2019-04-06 19:07:55 +02:00
parport Revert "parport: daisy: use new parport device model" 2019-03-25 14:49:00 -07:00
pci stream_open related patches for Linux 5.2 2019-05-07 12:15:13 -07:00
pcmcia
perf perf/arm-ccn: Clean up CPU hotplug handling 2019-04-23 12:29:37 +01:00
phy phy: sun4i-usb: Support set_mode to USB_HOST for non-OTG PHYs 2019-03-26 16:48:55 +09:00
pinctrl This is the bulk of pin control changes for the v5.1 kernel cycle. 2019-03-11 11:12:50 -07:00
platform *: convert stream-like files from nonseekable_open -> stream_open 2019-05-06 17:46:41 +03:00
pnp treewide: Switch printk users from %pf and %pF to %ps and %pS, respectively 2019-04-09 14:19:06 +02:00
power Power Supply Fixes for 5.1 cycle 2019-05-01 14:57:23 -07:00
powercap
pps
ps3
ptp Merge branch 'timers-2038-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-03-05 14:08:26 -08:00
pwm pwm: atmel: Remove useless symbolic definitions 2019-03-04 12:52:49 +01:00
rapidio rapidio/mport_cdev: mark expected switch fall-through 2019-03-07 18:32:02 -08:00
ras RAS/CEC: Increment cec_entered under the mutex lock 2019-04-20 12:16:52 +02:00
regulator Merge branch 'regulator-5.2' into regulator-next 2019-05-06 22:52:14 +09:00
remoteproc remoteproc updates for v5.1 2019-03-14 09:00:06 -07:00
reset reset: meson-audio-arb: Fix missing .owner setting of reset_controller_dev 2019-03-25 16:22:10 +01:00
rpmsg
rtc *: convert stream-like files from nonseekable_open -> stream_open 2019-05-06 17:46:41 +03:00
s390 stream_open related patches for Linux 5.2 2019-05-07 12:15:13 -07:00
sbus
scsi Wimplicit-fallthrough patches for 5.2-rc1 2019-05-07 12:48:10 -07:00
sfi
sh
siox
slimbus
sn
soc This pull request brings in a build fix for arm64 with bcm2835 2019-03-18 10:31:24 -07:00
soundwire
spi stream_open related patches for Linux 5.2 2019-05-07 12:15:13 -07:00
spmi
ssb drivers: Remove explicit invocations of mmiowb() 2019-04-08 12:01:02 +01:00
staging stream_open related patches for Linux 5.2 2019-05-07 12:15:13 -07:00
target crypto: shash - remove shash_desc::flags 2019-04-25 15:38:12 +08:00
tc
tee ARM: SoC driver updates for 5.1 2019-03-06 09:41:12 -08:00
thermal ACPICA: Rename nameseg length macro/define for clarity 2019-04-09 11:24:48 +02:00
thunderbolt crypto: shash - remove shash_desc::flags 2019-04-25 15:38:12 +08:00
tty Remove Mysterious Macro Intended to Obscure Weird Behaviours (mmiowb()) 2019-05-06 16:57:52 -07:00
uio
usb stream_open related patches for Linux 5.2 2019-05-07 12:15:13 -07:00
uwb
vfio Make anon_inodes unconditional 2019-04-19 14:03:11 +02:00
vhost vhost: reject zero size iova range 2019-04-10 22:45:38 -07:00
video efifb: Omit memory map check on legacy boot 2019-03-29 07:34:59 +01:00
virt virt: vbox: Implement passing requestor info to the host for VirtualBox 6.0.x 2019-03-28 01:55:18 +09:00
virtio virtio: Honour 'may_reduce_num' in vring_create_virtqueue 2019-04-08 17:05:52 -04:00
visorbus
vlynq
vme
w1 USB: w1 ds2490: Fix bug caused by improper use of altsetting array 2019-04-25 11:11:41 +02:00
watchdog stream_open related patches for Linux 5.2 2019-05-07 12:15:13 -07:00
xen stream_open related patches for Linux 5.2 2019-05-07 12:15:13 -07:00
zorro
Kconfig
Makefile IOMMU Updates for Linux v5.1 2019-03-10 12:29:52 -07:00