scsi: sun3_scsi: Mark expected switch fall-throughs
Subsystems (2)
PATCH 1/1 scsi: sun3_scsi: Mark expected switch fall-throughs
Mark switch cases where we are expecting to fall through.
This patch fixes the following warnings:
drivers/scsi/sun3_scsi.c: warning: this statement may fall through [-Wimplicit-fallthrough=]: => 399:9, 403:9
--- drivers/scsi/sun3_scsi.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/scsi/sun3_scsi.c +2 -0
@@ -397,10 +397,12 @@ static int sun3scsi_dma_finish(int write_flag)case CSR_LEFT_3 : *vaddr = (dregs->bpack_lo &0xff00 ) >>8 ; vaddr--; +/* Fall through */ case CSR_LEFT_2 : *vaddr = (dregs->bpack_hi &0x00ff ); vaddr--; +/* Fall through */ case CSR_LEFT_1 : *vaddr = (dregs->bpack_hi &0xff00 ) >>8 ;
Signature · 1 line
2.22.0
Hi Gustavo,
Quoted 9 lines · Gustavo A. R. Silva
Mark switch cases where we are expecting to fall through.
This patch fixes the following warnings:
drivers/scsi/sun3_scsi.c: warning: this statement may fall through [-Wimplicit-fallthrough=]: => 399:9, 403:9Reported-by Geert Uytterhoeven <[email protected]>Signed-off-by Gustavo A. R. Silva <[email protected]>
Thanks!
drivers/scsi/sun3_scsi.c static int sun3scsi_dma_finish(int write_flag) · line 406
Quoted 13 lines
drivers/scsi/sun3_scsi.c +2
-0@@ -397,10 +397,12 @@ static int sun3scsi_dma_finish(int write_flag)case CSR_LEFT_3 : *vaddr = (dregs->bpack_lo &0xff00 ) >>8 ; vaddr--; +/* Fall through */ case CSR_LEFT_2 : *vaddr = (dregs->bpack_hi &0x00ff ); vaddr--; +/* Fall through */
I think it would be clearer if you would drop the blank lines.
drivers/scsi/sun3_scsi.c static int sun3scsi_dma_finish(int write_flag) · line 408
Quoted 2 lines
drivers/scsi/sun3_scsi.c +0
-0case CSR_LEFT_1 : *vaddr = (dregs->bpack_hi &0xff00 ) >>8 ;
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Martin K. Petersen
AppliedGustavo,
Quoted 6 lines
Mark switch cases where we are expecting to fall through.
This patch fixes the following warnings:
drivers/scsi/sun3_scsi.c: warning: this statement may fall through [-Wimplicit-fallthrough=]: => 399:9, 403:9
Applied to 5.4/scsi-queue, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering