Commit 995ae10f authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Martin K. Petersen

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.orgSigned-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 9d8de441
...@@ -6130,6 +6130,7 @@ ahd_free(struct ahd_softc *ahd) ...@@ -6130,6 +6130,7 @@ ahd_free(struct ahd_softc *ahd)
fallthrough; fallthrough;
case 2: case 2:
ahd_dma_tag_destroy(ahd, ahd->shared_data_dmat); ahd_dma_tag_destroy(ahd, ahd->shared_data_dmat);
break;
case 1: case 1:
break; break;
case 0: case 0:
...@@ -6542,8 +6543,8 @@ ahd_fini_scbdata(struct ahd_softc *ahd) ...@@ -6542,8 +6543,8 @@ ahd_fini_scbdata(struct ahd_softc *ahd)
kfree(hscb_map); kfree(hscb_map);
} }
ahd_dma_tag_destroy(ahd, scb_data->hscb_dmat); ahd_dma_tag_destroy(ahd, scb_data->hscb_dmat);
/* FALLTHROUGH */
} }
fallthrough;
case 4: case 4:
case 3: case 3:
case 2: case 2:
...@@ -8907,6 +8908,7 @@ ahd_handle_scsi_status(struct ahd_softc *ahd, struct scb *scb) ...@@ -8907,6 +8908,7 @@ ahd_handle_scsi_status(struct ahd_softc *ahd, struct scb *scb)
break; break;
case SIU_PFC_ILLEGAL_REQUEST: case SIU_PFC_ILLEGAL_REQUEST:
printk("Illegal request\n"); printk("Illegal request\n");
break;
default: default:
break; break;
} }
......
...@@ -4478,6 +4478,7 @@ ahc_free(struct ahc_softc *ahc) ...@@ -4478,6 +4478,7 @@ ahc_free(struct ahc_softc *ahc)
fallthrough; fallthrough;
case 2: case 2:
ahc_dma_tag_destroy(ahc, ahc->shared_data_dmat); ahc_dma_tag_destroy(ahc, ahc->shared_data_dmat);
fallthrough;
case 1: case 1:
break; break;
case 0: case 0:
...@@ -5865,9 +5866,8 @@ ahc_search_qinfifo(struct ahc_softc *ahc, int target, char channel, ...@@ -5865,9 +5866,8 @@ ahc_search_qinfifo(struct ahc_softc *ahc, int target, char channel,
if ((scb->flags & SCB_ACTIVE) == 0) if ((scb->flags & SCB_ACTIVE) == 0)
printk("Inactive SCB in qinfifo\n"); printk("Inactive SCB in qinfifo\n");
ahc_done(ahc, scb); ahc_done(ahc, scb);
/* FALLTHROUGH */
} }
fallthrough;
case SEARCH_REMOVE: case SEARCH_REMOVE:
break; break;
case SEARCH_COUNT: case SEARCH_COUNT:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment