diff options
author | Gustavo A. R. Silva <gustavo@embeddedor.com> | 2018-07-03 15:23:05 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-08-13 14:48:54 -0400 |
commit | a2eed33dcdb7663170b01f05dd8d0a3323ffe4b3 (patch) | |
tree | b85ce0fc9f511d5c2098b831cc30fd4b2a7f73ec | |
parent | 777a82f87a9af591c3b02e9983d6cd3109022ea9 (diff) |
ide: mark expected switch fall-throughs
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/ide/hpt366.c | 5 | ||||
-rw-r--r-- | drivers/ide/ide-floppy.c | 1 | ||||
-rw-r--r-- | drivers/ide/ide-probe.c | 1 | ||||
-rw-r--r-- | drivers/ide/ide-taskfile.c | 3 | ||||
-rw-r--r-- | drivers/ide/sis5513.c | 1 |
5 files changed, 8 insertions, 3 deletions
diff --git a/drivers/ide/hpt366.c b/drivers/ide/hpt366.c index e52c58c29d9a..4d565b0c5a6e 100644 --- a/drivers/ide/hpt366.c +++ b/drivers/ide/hpt366.c | |||
@@ -574,13 +574,14 @@ static u8 hpt3xx_udma_filter(ide_drive_t *drive) | |||
574 | if (!HPT370_ALLOW_ATA100_5 || | 574 | if (!HPT370_ALLOW_ATA100_5 || |
575 | check_in_drive_list(drive, bad_ata100_5)) | 575 | check_in_drive_list(drive, bad_ata100_5)) |
576 | return ATA_UDMA4; | 576 | return ATA_UDMA4; |
577 | /* else: fall through */ | ||
577 | case HPT372 : | 578 | case HPT372 : |
578 | case HPT372A: | 579 | case HPT372A: |
579 | case HPT372N: | 580 | case HPT372N: |
580 | case HPT374 : | 581 | case HPT374 : |
581 | if (ata_id_is_sata(drive->id)) | 582 | if (ata_id_is_sata(drive->id)) |
582 | mask &= ~0x0e; | 583 | mask &= ~0x0e; |
583 | /* Fall thru */ | 584 | /* fall through */ |
584 | default: | 585 | default: |
585 | return mask; | 586 | return mask; |
586 | } | 587 | } |
@@ -600,7 +601,7 @@ static u8 hpt3xx_mdma_filter(ide_drive_t *drive) | |||
600 | case HPT374 : | 601 | case HPT374 : |
601 | if (ata_id_is_sata(drive->id)) | 602 | if (ata_id_is_sata(drive->id)) |
602 | return 0x00; | 603 | return 0x00; |
603 | /* Fall thru */ | 604 | /* else: fall through */ |
604 | default: | 605 | default: |
605 | return 0x07; | 606 | return 0x07; |
606 | } | 607 | } |
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index 5bd2aafc3753..a8df300f949c 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c | |||
@@ -427,6 +427,7 @@ static int ide_floppy_get_capacity(ide_drive_t *drive) | |||
427 | * (maintains previous driver behaviour) | 427 | * (maintains previous driver behaviour) |
428 | */ | 428 | */ |
429 | break; | 429 | break; |
430 | /* else: fall through */ | ||
430 | case CAPACITY_CURRENT: | 431 | case CAPACITY_CURRENT: |
431 | /* Normal Zip/LS-120 disks */ | 432 | /* Normal Zip/LS-120 disks */ |
432 | if (memcmp(cap_desc, &floppy->cap_desc, 8)) | 433 | if (memcmp(cap_desc, &floppy->cap_desc, 8)) |
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 416a2f353071..3b75a7b7a284 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -142,6 +142,7 @@ static void ide_classify_atapi_dev(ide_drive_t *drive) | |||
142 | } | 142 | } |
143 | /* Early cdrom models used zero */ | 143 | /* Early cdrom models used zero */ |
144 | type = ide_cdrom; | 144 | type = ide_cdrom; |
145 | /* fall through */ | ||
145 | case ide_cdrom: | 146 | case ide_cdrom: |
146 | drive->dev_flags |= IDE_DFLAG_REMOVABLE; | 147 | drive->dev_flags |= IDE_DFLAG_REMOVABLE; |
147 | #ifdef CONFIG_PPC | 148 | #ifdef CONFIG_PPC |
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index 89b29028d315..c21d5c50ae3a 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c | |||
@@ -128,7 +128,7 @@ ide_startstop_t do_rw_taskfile(ide_drive_t *drive, struct ide_cmd *orig_cmd) | |||
128 | return pre_task_out_intr(drive, cmd); | 128 | return pre_task_out_intr(drive, cmd); |
129 | } | 129 | } |
130 | handler = task_pio_intr; | 130 | handler = task_pio_intr; |
131 | /* fall-through */ | 131 | /* fall through */ |
132 | case ATA_PROT_NODATA: | 132 | case ATA_PROT_NODATA: |
133 | if (handler == NULL) | 133 | if (handler == NULL) |
134 | handler = task_no_data_intr; | 134 | handler = task_no_data_intr; |
@@ -140,6 +140,7 @@ ide_startstop_t do_rw_taskfile(ide_drive_t *drive, struct ide_cmd *orig_cmd) | |||
140 | hwif->expiry = dma_ops->dma_timer_expiry; | 140 | hwif->expiry = dma_ops->dma_timer_expiry; |
141 | ide_execute_command(drive, cmd, ide_dma_intr, 2 * WAIT_CMD); | 141 | ide_execute_command(drive, cmd, ide_dma_intr, 2 * WAIT_CMD); |
142 | dma_ops->dma_start(drive); | 142 | dma_ops->dma_start(drive); |
143 | /* fall through */ | ||
143 | default: | 144 | default: |
144 | return ide_started; | 145 | return ide_started; |
145 | } | 146 | } |
diff --git a/drivers/ide/sis5513.c b/drivers/ide/sis5513.c index c3062b53056f..024bc7ba49ee 100644 --- a/drivers/ide/sis5513.c +++ b/drivers/ide/sis5513.c | |||
@@ -494,6 +494,7 @@ static int init_chipset_sis5513(struct pci_dev *dev) | |||
494 | pci_read_config_byte(dev, 0x09, ®); | 494 | pci_read_config_byte(dev, 0x09, ®); |
495 | if ((reg & 0x0f) != 0x00) | 495 | if ((reg & 0x0f) != 0x00) |
496 | pci_write_config_byte(dev, 0x09, reg&0xf0); | 496 | pci_write_config_byte(dev, 0x09, reg&0xf0); |
497 | /* fall through */ | ||
497 | case ATA_16: | 498 | case ATA_16: |
498 | /* force per drive recovery and active timings | 499 | /* force per drive recovery and active timings |
499 | needed on ATA_33 and below chips */ | 500 | needed on ATA_33 and below chips */ |