diff options
author | Gustavo A. R. Silva <gustavoars@kernel.org> | 2020-11-20 12:27:16 -0600 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2020-12-02 12:59:46 -0500 |
commit | 995ae10f8000699b6ac8186489235bc9f0b8de34 (patch) | |
tree | e4e6f342d7dcf9984d4106921c52ebe64f24a71c /drivers/scsi/aic7xxx/aic79xx_core.c | |
parent | 9d8de441db261dbb4abb989674a62d1c13fe4f93 (diff) | |
download | linux-995ae10f8000699b6ac8186489235bc9f0b8de34.tar.gz linux-995ae10f8000699b6ac8186489235bc9f0b8de34.tar.bz2 linux-995ae10f8000699b6ac8186489235bc9f0b8de34.zip |
scsi: aic7xxx: Fix fall-through warnings for Clang
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple
warnings by explicitly adding multiple break statements instead of just
letting the code fall through to the next case, and by adding fallthrough
statements in places where the code is intended to fall through, and
finally by replacing /* FALLTHROUGH */ comments with the new pseudo-keyword
macro fallthrough.
Link: https://github.com/KSPP/linux/issues/115
Link: https://lore.kernel.org/r/1a7cd2f77623e6ab46bbec0b6103b18491419206.1605896059.git.gustavoars@kernel.org
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/aic7xxx/aic79xx_core.c')
-rw-r--r-- | drivers/scsi/aic7xxx/aic79xx_core.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/aic7xxx/aic79xx_core.c b/drivers/scsi/aic7xxx/aic79xx_core.c index 78560a85b1e3..c55b5880eb7e 100644 --- a/drivers/scsi/aic7xxx/aic79xx_core.c +++ b/drivers/scsi/aic7xxx/aic79xx_core.c @@ -6130,6 +6130,7 @@ ahd_free(struct ahd_softc *ahd) fallthrough; case 2: ahd_dma_tag_destroy(ahd, ahd->shared_data_dmat); + break; case 1: break; case 0: @@ -6542,8 +6543,8 @@ ahd_fini_scbdata(struct ahd_softc *ahd) kfree(hscb_map); } ahd_dma_tag_destroy(ahd, scb_data->hscb_dmat); - /* FALLTHROUGH */ } + fallthrough; case 4: case 3: case 2: @@ -8907,6 +8908,7 @@ ahd_handle_scsi_status(struct ahd_softc *ahd, struct scb *scb) break; case SIU_PFC_ILLEGAL_REQUEST: printk("Illegal request\n"); + break; default: break; } |