Skip to content

Commit

Permalink
ide: mark expected switch fall-throughs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Gustavo A. R. Silva authored and David S. Miller committed Aug 13, 2018
1 parent 777a82f commit a2eed33
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
5 changes: 3 additions & 2 deletions drivers/ide/hpt366.c
Original file line number Diff line number Diff line change
Expand Up @@ -574,13 +574,14 @@ static u8 hpt3xx_udma_filter(ide_drive_t *drive)
if (!HPT370_ALLOW_ATA100_5 ||
check_in_drive_list(drive, bad_ata100_5))
return ATA_UDMA4;
/* else: fall through */
case HPT372 :
case HPT372A:
case HPT372N:
case HPT374 :
if (ata_id_is_sata(drive->id))
mask &= ~0x0e;
/* Fall thru */
/* fall through */
default:
return mask;
}
Expand All @@ -600,7 +601,7 @@ static u8 hpt3xx_mdma_filter(ide_drive_t *drive)
case HPT374 :
if (ata_id_is_sata(drive->id))
return 0x00;
/* Fall thru */
/* else: fall through */
default:
return 0x07;
}
Expand Down
1 change: 1 addition & 0 deletions drivers/ide/ide-floppy.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,7 @@ static int ide_floppy_get_capacity(ide_drive_t *drive)
* (maintains previous driver behaviour)
*/
break;
/* else: fall through */
case CAPACITY_CURRENT:
/* Normal Zip/LS-120 disks */
if (memcmp(cap_desc, &floppy->cap_desc, 8))
Expand Down
1 change: 1 addition & 0 deletions drivers/ide/ide-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ static void ide_classify_atapi_dev(ide_drive_t *drive)
}
/* Early cdrom models used zero */
type = ide_cdrom;
/* fall through */
case ide_cdrom:
drive->dev_flags |= IDE_DFLAG_REMOVABLE;
#ifdef CONFIG_PPC
Expand Down
3 changes: 2 additions & 1 deletion drivers/ide/ide-taskfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ ide_startstop_t do_rw_taskfile(ide_drive_t *drive, struct ide_cmd *orig_cmd)
return pre_task_out_intr(drive, cmd);
}
handler = task_pio_intr;
/* fall-through */
/* fall through */
case ATA_PROT_NODATA:
if (handler == NULL)
handler = task_no_data_intr;
Expand All @@ -140,6 +140,7 @@ ide_startstop_t do_rw_taskfile(ide_drive_t *drive, struct ide_cmd *orig_cmd)
hwif->expiry = dma_ops->dma_timer_expiry;
ide_execute_command(drive, cmd, ide_dma_intr, 2 * WAIT_CMD);
dma_ops->dma_start(drive);
/* fall through */
default:
return ide_started;
}
Expand Down
1 change: 1 addition & 0 deletions drivers/ide/sis5513.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,7 @@ static int init_chipset_sis5513(struct pci_dev *dev)
pci_read_config_byte(dev, 0x09, &reg);
if ((reg & 0x0f) != 0x00)
pci_write_config_byte(dev, 0x09, reg&0xf0);
/* fall through */
case ATA_16:
/* force per drive recovery and active timings
needed on ATA_33 and below chips */
Expand Down

0 comments on commit a2eed33

Please sign in to comment.