Skip to content

Commit a2eed33

Browse files
GustavoARSilvadavem330
authored andcommitted
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>
1 parent 777a82f commit a2eed33

5 files changed

Lines changed: 8 additions & 3 deletions

File tree

‎drivers/ide/hpt366.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,13 +574,14 @@ static u8 hpt3xx_udma_filter(ide_drive_t *drive)
574574
if (!HPT370_ALLOW_ATA100_5 ||
575575
check_in_drive_list(drive, bad_ata100_5))
576576
return ATA_UDMA4;
577+
/* else: fall through */
577578
case HPT372 :
578579
case HPT372A:
579580
case HPT372N:
580581
case HPT374 :
581582
if (ata_id_is_sata(drive->id))
582583
mask &= ~0x0e;
583-
/* Fall thru */
584+
/* fall through */
584585
default:
585586
return mask;
586587
}
@@ -600,7 +601,7 @@ static u8 hpt3xx_mdma_filter(ide_drive_t *drive)
600601
case HPT374 :
601602
if (ata_id_is_sata(drive->id))
602603
return 0x00;
603-
/* Fall thru */
604+
/* else: fall through */
604605
default:
605606
return 0x07;
606607
}

‎drivers/ide/ide-floppy.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,7 @@ static int ide_floppy_get_capacity(ide_drive_t *drive)
427427
* (maintains previous driver behaviour)
428428
*/
429429
break;
430+
/* else: fall through */
430431
case CAPACITY_CURRENT:
431432
/* Normal Zip/LS-120 disks */
432433
if (memcmp(cap_desc, &floppy->cap_desc, 8))

‎drivers/ide/ide-probe.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ static void ide_classify_atapi_dev(ide_drive_t *drive)
142142
}
143143
/* Early cdrom models used zero */
144144
type = ide_cdrom;
145+
/* fall through */
145146
case ide_cdrom:
146147
drive->dev_flags |= IDE_DFLAG_REMOVABLE;
147148
#ifdef CONFIG_PPC

‎drivers/ide/ide-taskfile.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ ide_startstop_t do_rw_taskfile(ide_drive_t *drive, struct ide_cmd *orig_cmd)
128128
return pre_task_out_intr(drive, cmd);
129129
}
130130
handler = task_pio_intr;
131-
/* fall-through */
131+
/* fall through */
132132
case ATA_PROT_NODATA:
133133
if (handler == NULL)
134134
handler = task_no_data_intr;
@@ -140,6 +140,7 @@ ide_startstop_t do_rw_taskfile(ide_drive_t *drive, struct ide_cmd *orig_cmd)
140140
hwif->expiry = dma_ops->dma_timer_expiry;
141141
ide_execute_command(drive, cmd, ide_dma_intr, 2 * WAIT_CMD);
142142
dma_ops->dma_start(drive);
143+
/* fall through */
143144
default:
144145
return ide_started;
145146
}

‎drivers/ide/sis5513.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,7 @@ static int init_chipset_sis5513(struct pci_dev *dev)
494494
pci_read_config_byte(dev, 0x09, &reg);
495495
if ((reg & 0x0f) != 0x00)
496496
pci_write_config_byte(dev, 0x09, reg&0xf0);
497+
/* fall through */
497498
case ATA_16:
498499
/* force per drive recovery and active timings
499500
needed on ATA_33 and below chips */

0 commit comments

Comments
 (0)