1
0
Fork 0
alistair23-linux/drivers/gpu/drm
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
..
amd drm/amd/display: If one stream full updates, full update all planes 2019-04-14 23:45:43 -05:00
arc drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
arm drm/komeda: fix build with drm_modeset_helper.h update 2019-02-11 10:36:00 +01:00
armada drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
ast Merge branch 'drm-next-5.1' of git://people.freedesktop.org/~agd5f/linux into drm-next 2019-02-04 14:57:34 +10:00
atmel-hlcdc drm/irq: Don't check for DRIVER_HAVE_IRQ in drm_irq_(un)install 2019-01-29 15:45:06 +01:00
bochs Linux 5.0 2019-03-04 12:02:55 +10:00
bridge drm/bridge: dw-hdmi: fix SCDC configuration for ddc-i2c-bus 2019-04-25 10:38:21 +02:00
cirrus drm/cirrus: add plane setup 2019-02-05 10:28:13 +01:00
etnaviv Merge branch 'etnaviv/next' of https://git.pengutronix.de/git/lst/linux into drm-next 2019-03-12 15:20:57 +10:00
exynos drm/exynos/mixer: fix MIXER shadow registry synchronisation code 2019-03-21 09:47:29 +09:00
fsl-dcu drm/irq: Don't check for DRIVER_HAVE_IRQ in drm_irq_(un)install 2019-01-29 15:45:06 +01:00
gma500 drm/irq: Ditch DRIVER_IRQ_SHARED 2019-01-29 15:45:21 +01:00
hisilicon drm/irq: Don't check for DRIVER_HAVE_IRQ in drm_irq_(un)install 2019-01-29 15:45:06 +01:00
i2c drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
i810
i915 Remove Mysterious Macro Intended to Obscure Weird Behaviours (mmiowb()) 2019-05-06 16:57:52 -07:00
imx drm/imx: don't skip DP channel disable for background plane 2019-04-23 14:54:22 +02:00
lib
mediatek drm/mediatek: no change parent rate in round_rate() for MT2701 hdmi phy 2019-04-09 17:47:01 +08:00
meson drm/meson: fix TMDS clock filtering for DMT monitors 2019-03-25 11:19:50 +01:00
mga drm/irq: Ditch DRIVER_IRQ_SHARED 2019-01-29 15:45:21 +01:00
mgag200 Merge branch 'drm-next-5.1' of git://people.freedesktop.org/~agd5f/linux into drm-next 2019-02-04 14:57:34 +10:00
msm drm next pull request for 5.1 2019-03-08 08:23:15 -08:00
mxsfb drm/irq: Don't check for DRIVER_HAVE_IRQ in drm_irq_(un)install 2019-01-29 15:45:06 +01:00
nouveau drm/nouveau/nvkm: mark expected switch fall-throughs 2019-04-10 10:07:29 -05:00
omapdrm drm/omap: hdmi4_cec: Fix CEC clock handling for PM 2019-03-27 11:10:51 +02:00
panel drm/panel: simple: Add support for PDA 91-00156-A0 panel 2019-01-28 17:45:28 +01:00
pl111 drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
qxl Revert "drm/qxl: drop prime import/export callbacks" 2019-04-30 14:08:48 +02:00
r128 drm/irq: Ditch DRIVER_IRQ_SHARED 2019-01-29 15:45:21 +01:00
radeon Linux 5.0 2019-03-04 12:02:55 +10:00
rcar-du Merge drm/drm-next into drm-misc-next 2019-02-11 10:35:35 +01:00
rockchip drm/rockchip: vop: reset scale mode when win is disabled 2019-03-18 18:58:12 +01:00
savage drm/savage: mark expected switch fall-throughs 2019-01-30 17:35:29 +01:00
scheduler drm/sched: Fix description of drm_sched_stop 2019-04-23 11:15:38 -05:00
selftests drm/selftest: fix spelling mistake "dimention" -> "dimension" 2018-12-11 15:19:42 +01:00
shmobile drm/irq: Don't check for DRIVER_HAVE_IRQ in drm_irq_(un)install 2019-01-29 15:45:06 +01:00
sis
sti drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
stm drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
sun4i drm/sun4i: Unbind components before releasing DRM and memory 2019-04-24 15:09:08 +02:00
tdfx
tegra drm/tegra: hdmi: Setup audio only if configured 2019-04-17 09:28:43 +02:00
tilcdc drm/irq: Don't check for DRIVER_HAVE_IRQ in drm_irq_(un)install 2019-01-29 15:45:06 +01:00
tinydrm drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
ttm drm/ttm: fix re-init of global structures 2019-04-19 11:11:20 -05:00
tve200 drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
udl drm/udl: add a release method and delay modeset teardown 2019-04-08 16:20:02 +10:00
v3d drm/sched: Refactor ring mirror list handling. 2019-01-25 16:15:36 -05:00
vc4 drm/vc4: Fix compilation error reported by kbuild test bot 2019-04-24 17:27:14 +02:00
vgem drm/vgem: fix use-after-free when drm_gem_handle_create() fails 2019-03-18 08:45:57 +01:00
via drm/via: mark expected switch fall-throughs 2019-01-30 17:35:29 +01:00
virtio Revert "drm/virtio: drop prime import/export callbacks" 2019-04-24 10:52:52 +10:00
vkms drm/vkms: fix use-after-free when drm_gem_handle_create() fails 2019-03-18 08:45:57 +01:00
vmwgfx Merge branch 'vmwgfx-fixes-5.1' of git://people.freedesktop.org/~thomash/linux into drm-fixes 2019-04-26 10:31:26 +10:00
xen drm/xen-front: Fix mmap attributes for display buffers 2019-02-04 08:39:31 +02:00
zte drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
Kconfig drm/cma-helper: Remove unused fbdev code 2019-01-17 10:56:38 +01:00
Makefile drm: rcar-du: lvds: Add API to enable/disable clock output 2019-02-08 02:25:56 +02:00
ati_pcigart.c drm/ati_pcigart: Fix error code in drm_ati_pcigart_init() 2018-12-17 10:47:17 +01:00
drm_agpsupport.c drm: Trivial comment grammar cleanups 2019-02-04 10:21:17 +01:00
drm_atomic.c drm-misc-next for 5.1: 2019-01-10 05:58:52 +10:00
drm_atomic_helper.c drm/atomic-helper: Make atomic_enable/disable crtc callbacks optional 2019-03-29 11:56:52 +01:00
drm_atomic_state_helper.c drm: Put damage blob when destroy plane state 2018-12-24 11:53:50 +01:00
drm_atomic_uapi.c Linux 5.0-rc7 2019-02-18 13:27:15 +10:00
drm_auth.c drm: set is_master to 0 upon drm_new_set_master() failure 2018-11-26 16:14:27 -05:00
drm_blend.c
drm_bridge.c drm: bridge: Constify mode arguments to bridge .mode_set() operation 2019-01-14 03:51:14 +02:00
drm_bufs.c drm: Trivial comment grammar cleanups 2019-02-04 10:21:17 +01:00
drm_cache.c
drm_client.c drm/gem: Add drm_gem_object_funcs 2018-11-20 14:56:18 +01:00
drm_color_mgmt.c drm: Constify drm_color_lut_check() 2019-01-29 23:26:12 +02:00
drm_connector.c drm: Trivial comment grammar cleanups 2019-02-04 10:21:17 +01:00
drm_context.c drm: Fix error handling in drm_legacy_addctx 2019-01-07 11:26:31 +01:00
drm_crtc.c drm: Move the legacy kms disable_all helper to crtc helpers 2019-01-11 22:54:29 +01:00
drm_crtc_helper.c drm: Remove use of drm_mode_object 2019-01-15 13:20:56 +01:00
drm_crtc_helper_internal.h
drm_crtc_internal.h drm: Unexport drm_crtc_force_disable 2019-01-11 15:56:40 +01:00
drm_damage_helper.c drm: prepare for drmP.h removal from drm_modeset_helper.h 2019-02-07 21:48:28 +01:00
drm_debugfs.c drm: Merge drm_info.c into drm_debugfs.c 2018-11-22 09:52:27 +01:00
drm_debugfs_crc.c
drm_dma.c
drm_dp_aux_dev.c
drm_dp_cec.c drm: Do not call drm_dp_cec_set_edid() while registering DP connectors 2018-10-11 10:52:35 +02:00
drm_dp_dual_mode_helper.c
drm_dp_helper.c drm/dsc: Add kernel documentation for DRM DP DSC helpers 2019-02-08 13:38:51 -08:00
drm_dp_mst_topology.c drm/dp_mst: Remove rebase-detritus in VCPI helper kernel-docs 2019-02-06 13:37:38 -05:00
drm_drv.c drm: Fix drm_release() and device unplug 2019-03-25 15:58:05 +10:00
drm_dsc.c drm/dsc: Add kernel documentation for DRM DP DSC helpers 2019-02-08 13:38:51 -08:00
drm_dumb_buffers.c
drm_edid.c drm/edid: Add display_info.rgb_quant_range_selectable 2019-01-10 19:01:06 +02:00
drm_edid_load.c
drm_encoder.c
drm_encoder_slave.c
drm_fb_cma_helper.c drm/cma-helper: Remove unused fbdev code 2019-01-17 10:56:38 +01:00
drm_fb_helper.c drm/fb: avoid setting 0 depth. 2019-03-25 09:25:20 +10:00
drm_file.c drm: Fix drm_release() and device unplug 2019-03-25 15:58:05 +10:00
drm_flip_work.c drm: move drm_can_sleep() to drm_util.h 2019-01-14 10:58:37 +01:00
drm_fourcc.c drm/fourcc: Add new P010, P016 video format 2019-02-08 22:17:08 +01:00
drm_framebuffer.c drm: Trivial comment grammar cleanups 2019-02-04 10:21:17 +01:00
drm_gem.c drm: Trivial comment grammar cleanups 2019-02-04 10:21:17 +01:00
drm_gem_cma_helper.c drm/cma-helper: Add DRM_GEM_CMA_VMAP_DRIVER_OPS 2018-11-20 14:57:25 +01:00
drm_gem_framebuffer_helper.c drm/gem-fb-helper: Add drm_gem_fb_create_with_dirty() 2019-01-17 10:56:45 +01:00
drm_hashtab.c
drm_internal.h drm-misc-next for 5.1: 2019-01-10 05:58:52 +10:00
drm_ioc32.c drm: add __user attribute to ptr_to_compat() 2019-03-04 09:55:31 -05:00
drm_ioctl.c drm: allow render capable master with DRM_AUTH ioctls 2019-02-13 17:42:36 +00:00
drm_irq.c drm/irq: Ditch DRIVER_IRQ_SHARED 2019-01-29 15:45:21 +01:00
drm_kms_helper_common.c
drm_lease.c Linux 5.0-rc7 2019-02-18 13:27:15 +10:00
drm_legacy.h
drm_lock.c
drm_memory.c drm: Shift * to be adjacent to pointer name 2018-10-16 14:39:25 +02:00
drm_mipi_dsi.c
drm_mm.c drm: Simplify stacktrace handling 2019-04-29 12:37:53 +02:00
drm_mode_config.c drm-misc-next for 5.1: 2019-01-10 05:58:52 +10:00
drm_mode_object.c gpu/drm: Fix lock held when returning to user space. 2019-01-10 11:31:58 +01:00
drm_modes.c Linux 5.0-rc7 2019-02-18 13:27:15 +10:00
drm_modeset_helper.c drm: prepare for drmP.h removal from drm_modeset_helper.h 2019-02-07 21:48:28 +01:00
drm_modeset_lock.c drm/atomic: integrate modeset lock with private objects 2018-12-11 15:24:30 +01:00
drm_of.c drm/of: Fix kerneldoc 2019-01-12 13:07:58 +01:00
drm_panel.c drm/panel: Small documentation polish 2019-01-12 13:08:12 +01:00
drm_panel_orientation_quirks.c drm: panel-orientation-quirks: Do rotation quirk for new GPD Win2 FW 2018-11-15 10:55:30 +01:00
drm_pci.c cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
drm_plane.c drm: Auto-set allow_fb_modifiers when given modifiers at plane init 2019-01-11 16:53:55 +01:00
drm_plane_helper.c drm: Unexport drm_plane_helper_check_update 2018-10-05 22:45:19 +02:00
drm_prime.c drm/prime: Fix drm_gem_prime_mmap() stack use 2018-11-22 15:44:05 +01:00
drm_print.c
drm_probe_helper.c drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
drm_property.c drm: Trivial comment grammar cleanups 2019-02-04 10:21:17 +01:00
drm_rect.c drm: Nuke drm_calc_{h,v}scale_relaxed() 2019-02-07 13:14:06 +02:00
drm_scatter.c
drm_scdc_helper.c
drm_simple_kms_helper.c drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
drm_syncobj.c drm/syncobj: remove drm_syncobj_cb and cleanup 2018-12-11 17:38:38 +01:00
drm_sysfs.c drm/lease: Send a distinct uevent 2018-11-30 10:57:18 +01:00
drm_trace.h
drm_trace_points.c
drm_vblank.c drm: Trivial comment grammar cleanups 2019-02-04 10:21:17 +01:00
drm_vm.c
drm_vma_manager.c
drm_writeback.c