diff options
| author | Gustavo A. R. Silva <gustavo@embeddedor.com> | 2018-11-26 12:41:47 -0500 |
|---|---|---|
| committer | Gustavo A. R. Silva <gustavo@embeddedor.com> | 2019-04-08 19:37:07 -0400 |
| commit | e2e801644eb345c563bbd0bb004907e89b932543 (patch) | |
| tree | 5c7bf86a2cbb7552ed1e38f83c719c13059c50b1 /drivers/scsi/aic7xxx | |
| parent | 74f79099efe0125b2cc1816655996b5288bb8446 (diff) | |
scsi: aic7xxx: mark expected switch fall-throughs
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Notice that, in some cases, I replaced "FALLTHROUGH" with a "fall through"
annotation and then placed it at the bottom of the corresponding switch
case, which is what GCC is expecting to find.
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Diffstat (limited to 'drivers/scsi/aic7xxx')
| -rw-r--r-- | drivers/scsi/aic7xxx/aic7xxx_core.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/scsi/aic7xxx/aic7xxx_core.c b/drivers/scsi/aic7xxx/aic7xxx_core.c index f3362f4ab16e..d4a7263e4b8f 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_core.c +++ b/drivers/scsi/aic7xxx/aic7xxx_core.c | |||
| @@ -4920,24 +4920,30 @@ ahc_fini_scbdata(struct ahc_softc *ahc) | |||
| 4920 | } | 4920 | } |
| 4921 | ahc_dma_tag_destroy(ahc, scb_data->sg_dmat); | 4921 | ahc_dma_tag_destroy(ahc, scb_data->sg_dmat); |
| 4922 | } | 4922 | } |
| 4923 | /* fall through */ | ||
| 4923 | case 6: | 4924 | case 6: |
| 4924 | ahc_dmamap_unload(ahc, scb_data->sense_dmat, | 4925 | ahc_dmamap_unload(ahc, scb_data->sense_dmat, |
| 4925 | scb_data->sense_dmamap); | 4926 | scb_data->sense_dmamap); |
| 4927 | /* fall through */ | ||
| 4926 | case 5: | 4928 | case 5: |
| 4927 | ahc_dmamem_free(ahc, scb_data->sense_dmat, scb_data->sense, | 4929 | ahc_dmamem_free(ahc, scb_data->sense_dmat, scb_data->sense, |
| 4928 | scb_data->sense_dmamap); | 4930 | scb_data->sense_dmamap); |
| 4929 | ahc_dmamap_destroy(ahc, scb_data->sense_dmat, | 4931 | ahc_dmamap_destroy(ahc, scb_data->sense_dmat, |
| 4930 | scb_data->sense_dmamap); | 4932 | scb_data->sense_dmamap); |
| 4933 | /* fall through */ | ||
| 4931 | case 4: | 4934 | case 4: |
| 4932 | ahc_dma_tag_destroy(ahc, scb_data->sense_dmat); | 4935 | ahc_dma_tag_destroy(ahc, scb_data->sense_dmat); |
| 4936 | /* fall through */ | ||
| 4933 | case 3: | 4937 | case 3: |
| 4934 | ahc_dmamap_unload(ahc, scb_data->hscb_dmat, | 4938 | ahc_dmamap_unload(ahc, scb_data->hscb_dmat, |
| 4935 | scb_data->hscb_dmamap); | 4939 | scb_data->hscb_dmamap); |
| 4940 | /* fall through */ | ||
| 4936 | case 2: | 4941 | case 2: |
| 4937 | ahc_dmamem_free(ahc, scb_data->hscb_dmat, scb_data->hscbs, | 4942 | ahc_dmamem_free(ahc, scb_data->hscb_dmat, scb_data->hscbs, |
| 4938 | scb_data->hscb_dmamap); | 4943 | scb_data->hscb_dmamap); |
| 4939 | ahc_dmamap_destroy(ahc, scb_data->hscb_dmat, | 4944 | ahc_dmamap_destroy(ahc, scb_data->hscb_dmat, |
| 4940 | scb_data->hscb_dmamap); | 4945 | scb_data->hscb_dmamap); |
| 4946 | /* fall through */ | ||
| 4941 | case 1: | 4947 | case 1: |
| 4942 | ahc_dma_tag_destroy(ahc, scb_data->hscb_dmat); | 4948 | ahc_dma_tag_destroy(ahc, scb_data->hscb_dmat); |
| 4943 | break; | 4949 | break; |
| @@ -6002,8 +6008,8 @@ ahc_search_qinfifo(struct ahc_softc *ahc, int target, char channel, | |||
| 6002 | if ((scb->flags & SCB_ACTIVE) == 0) | 6008 | if ((scb->flags & SCB_ACTIVE) == 0) |
| 6003 | printk("Inactive SCB in Waiting List\n"); | 6009 | printk("Inactive SCB in Waiting List\n"); |
| 6004 | ahc_done(ahc, scb); | 6010 | ahc_done(ahc, scb); |
| 6005 | /* FALLTHROUGH */ | ||
| 6006 | } | 6011 | } |
| 6012 | /* fall through */ | ||
| 6007 | case SEARCH_REMOVE: | 6013 | case SEARCH_REMOVE: |
| 6008 | next = ahc_rem_wscb(ahc, next, prev); | 6014 | next = ahc_rem_wscb(ahc, next, prev); |
| 6009 | break; | 6015 | break; |
| @@ -7008,8 +7014,8 @@ ahc_download_instr(struct ahc_softc *ahc, u_int instrptr, uint8_t *dconsts) | |||
| 7008 | } | 7014 | } |
| 7009 | address -= address_offset; | 7015 | address -= address_offset; |
| 7010 | fmt3_ins->address = address; | 7016 | fmt3_ins->address = address; |
| 7011 | /* FALLTHROUGH */ | ||
| 7012 | } | 7017 | } |
| 7018 | /* fall through */ | ||
| 7013 | case AIC_OP_OR: | 7019 | case AIC_OP_OR: |
| 7014 | case AIC_OP_AND: | 7020 | case AIC_OP_AND: |
| 7015 | case AIC_OP_XOR: | 7021 | case AIC_OP_XOR: |
| @@ -7035,7 +7041,7 @@ ahc_download_instr(struct ahc_softc *ahc, u_int instrptr, uint8_t *dconsts) | |||
| 7035 | fmt1_ins->opcode = AIC_OP_AND; | 7041 | fmt1_ins->opcode = AIC_OP_AND; |
| 7036 | fmt1_ins->immediate = 0xff; | 7042 | fmt1_ins->immediate = 0xff; |
| 7037 | } | 7043 | } |
| 7038 | /* FALLTHROUGH */ | 7044 | /* fall through */ |
| 7039 | case AIC_OP_ROL: | 7045 | case AIC_OP_ROL: |
| 7040 | if ((ahc->features & AHC_ULTRA2) != 0) { | 7046 | if ((ahc->features & AHC_ULTRA2) != 0) { |
| 7041 | int i, count; | 7047 | int i, count; |
