Re: [PATCH 06/41] scsi: aic7xxx: mark expected switch fall-throughs

From: Gustavo A. R. Silva
Date: Thu Jan 10 2019 - 15:15:16 EST


Hi,

Friendly ping (second one):

Who can ack/review/take this patch, please?

Thanks
--
Gustavo

On 12/19/18 9:37 AM, Gustavo A. R. Silva wrote:
Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:26 PM, Gustavo A. R. Silva wrote:
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.

Signed-off-by: Gustavo A. R. Silva <gustavo@xxxxxxxxxxxxxx>
---
 drivers/scsi/aic7xxx/aic7xxx_core.c | 12 +++++++++---
 1 file 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)
ÂÂÂÂÂÂÂÂÂ }
ÂÂÂÂÂÂÂÂÂ ahc_dma_tag_destroy(ahc, scb_data->sg_dmat);
ÂÂÂÂÂ }
+ÂÂÂÂÂÂÂ /* fall through */
ÂÂÂÂÂ case 6:
ÂÂÂÂÂÂÂÂÂ ahc_dmamap_unload(ahc, scb_data->sense_dmat,
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ scb_data->sense_dmamap);
+ÂÂÂÂÂÂÂ /* fall through */
ÂÂÂÂÂ case 5:
ÂÂÂÂÂÂÂÂÂ ahc_dmamem_free(ahc, scb_data->sense_dmat, scb_data->sense,
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ scb_data->sense_dmamap);
ÂÂÂÂÂÂÂÂÂ ahc_dmamap_destroy(ahc, scb_data->sense_dmat,
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ scb_data->sense_dmamap);
+ÂÂÂÂÂÂÂ /* fall through */
ÂÂÂÂÂ case 4:
ÂÂÂÂÂÂÂÂÂ ahc_dma_tag_destroy(ahc, scb_data->sense_dmat);
+ÂÂÂÂÂÂÂ /* fall through */
ÂÂÂÂÂ case 3:
ÂÂÂÂÂÂÂÂÂ ahc_dmamap_unload(ahc, scb_data->hscb_dmat,
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ scb_data->hscb_dmamap);
+ÂÂÂÂÂÂÂ /* fall through */
ÂÂÂÂÂ case 2:
ÂÂÂÂÂÂÂÂÂ ahc_dmamem_free(ahc, scb_data->hscb_dmat, scb_data->hscbs,
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ scb_data->hscb_dmamap);
ÂÂÂÂÂÂÂÂÂ ahc_dmamap_destroy(ahc, scb_data->hscb_dmat,
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ scb_data->hscb_dmamap);
+ÂÂÂÂÂÂÂ /* fall through */
ÂÂÂÂÂ case 1:
ÂÂÂÂÂÂÂÂÂ ahc_dma_tag_destroy(ahc, scb_data->hscb_dmat);
ÂÂÂÂÂÂÂÂÂ break;
@@ -6002,8 +6008,8 @@ ahc_search_qinfifo(struct ahc_softc *ahc, int target, char channel,
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ if ((scb->flags & SCB_ACTIVE) == 0)
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ printk("Inactive SCB in Waiting List\n");
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ ahc_done(ahc, scb);
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ /* FALLTHROUGH */
ÂÂÂÂÂÂÂÂÂÂÂÂÂ }
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ /* fall through */
ÂÂÂÂÂÂÂÂÂÂÂÂÂ case SEARCH_REMOVE:
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ next = ahc_rem_wscb(ahc, next, prev);
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ break;
@@ -7008,8 +7014,8 @@ ahc_download_instr(struct ahc_softc *ahc, u_int instrptr, uint8_t *dconsts)
ÂÂÂÂÂÂÂÂÂ }
ÂÂÂÂÂÂÂÂÂ address -= address_offset;
ÂÂÂÂÂÂÂÂÂ fmt3_ins->address = address;
-ÂÂÂÂÂÂÂ /* FALLTHROUGH */
ÂÂÂÂÂ }
+ÂÂÂÂÂÂÂ /* fall through */
ÂÂÂÂÂ case AIC_OP_OR:
ÂÂÂÂÂ case AIC_OP_AND:
ÂÂÂÂÂ case AIC_OP_XOR:
@@ -7035,7 +7041,7 @@ ahc_download_instr(struct ahc_softc *ahc, u_int instrptr, uint8_t *dconsts)
ÂÂÂÂÂÂÂÂÂÂÂÂÂ fmt1_ins->opcode = AIC_OP_AND;
ÂÂÂÂÂÂÂÂÂÂÂÂÂ fmt1_ins->immediate = 0xff;
ÂÂÂÂÂÂÂÂÂ }
-ÂÂÂÂÂÂÂ /* FALLTHROUGH */
+ÂÂÂÂÂÂÂ /* fall through */
ÂÂÂÂÂ case AIC_OP_ROL:
ÂÂÂÂÂÂÂÂÂ if ((ahc->features & AHC_ULTRA2) != 0) {
ÂÂÂÂÂÂÂÂÂÂÂÂÂ int i, count;