linux/drivers/scsi/bfa
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
..
bfa_core.c scsi: bfa: use ARRAY_SIZE for array sizing calculation on array __pciids 2018-01-10 23:25:10 -05:00
bfa_cs.h scsi: bfa: use ktime_get_real_ts64 for firmware timestamp 2017-12-04 20:32:52 -05:00
bfa_defs_fcs.h
bfa_defs_svc.h scsi: bfa: Avoid implicit enum conversion in bfad_im_post_vendor_event 2018-10-16 21:45:12 -04:00
bfa_defs.h
bfa_fc.h
bfa_fcbuild.c scsi: bfa: Remove unused functions 2018-10-16 18:21:01 -04:00
bfa_fcbuild.h scsi: bfa: Remove unused functions 2018-10-16 18:21:01 -04:00
bfa_fcpim.c scsi: bfa: bfa_fcpim: Mark expected switch fall-throughs 2019-04-08 18:37:24 -05:00
bfa_fcpim.h scsi: bfa: document overflow of io_profile_start_time 2017-12-04 20:32:52 -05:00
bfa_fcs_fcpim.c
bfa_fcs_lport.c scsi: bfa: bfa_fcs_lport: Mark expected switch fall-throughs 2019-01-11 21:47:47 -05:00
bfa_fcs_rport.c scsi: bfa: bfa_fcs_rport: Mark expected switch fall-throughs 2019-01-11 21:47:47 -05:00
bfa_fcs.c scsi: bfa: convert to strlcpy/strlcat 2017-12-11 21:30:46 -05:00
bfa_fcs.h scsi: bfa: remove bfa_fcs_mod_s 2017-01-09 23:34:58 -05:00
bfa_hw_cb.c drivers: Remove explicit invocations of mmiowb() 2019-04-08 12:01:02 +01:00
bfa_hw_ct.c drivers: Remove explicit invocations of mmiowb() 2019-04-08 12:01:02 +01:00
bfa_ioc_cb.c
bfa_ioc_ct.c
bfa_ioc.c scsi: bfa: bfa_ioc: Mark expected switch fall-throughs 2019-01-11 21:47:47 -05:00
bfa_ioc.h scsi: bfa: turn bfa_mem_{kva,dma}_setup into inline functions 2016-11-21 22:28:17 -05:00
bfa_modules.h scsi: bfa: remove bfa_module_s madness 2017-04-19 22:12:14 -04:00
bfa_plog.h
bfa_port.c scsi: bfa: use proper time accessor for stats_reset_time 2017-12-04 20:32:52 -05:00
bfa_port.h scsi: bfa: use proper time accessor for stats_reset_time 2017-12-04 20:32:52 -05:00
bfa_svc.c scsi: bfa: convert to strlcpy/strlcat 2017-12-11 21:30:46 -05:00
bfa_svc.h scsi: bfa: use proper time accessor for stats_reset_time 2017-12-04 20:32:52 -05:00
bfa.h drivers: Remove explicit invocations of mmiowb() 2019-04-08 12:01:02 +01:00
bfad_attr.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
bfad_bsg.c cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
bfad_bsg.h
bfad_debugfs.c scsi: bfa: no need to check return value of debugfs_create functions 2019-01-29 00:40:40 -05:00
bfad_drv.h treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
bfad_im.c scsi: flip the default on use_clustering 2018-12-18 23:13:12 -05:00
bfad_im.h scsi: bfa: Avoid implicit enum conversion in bfad_im_post_vendor_event 2018-10-16 21:45:12 -04:00
bfad.c scsi: bfa: fix calls to dma_set_mask_and_coherent() 2019-02-25 21:44:29 -05:00
bfi_ms.h scripts/spelling.txt: add "aligment" pattern and fix typo instances 2017-02-27 18:43:46 -08:00
bfi_reg.h
bfi.h
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00