Commit 159127ea authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide

Pull IDE updates from David Miller:

 - Remove redundant variables (Colin Ian King)

 - Expected switch fall-through annotations (Gustavo A. R. Silva)

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide:
  ide: mark expected switch fall-throughs
  ide-tape: remove redundant variable buffer_size
  ide: remove redundant variables queue_run_ms and left
parents 9617ba39 a2eed33d
...@@ -574,13 +574,14 @@ static u8 hpt3xx_udma_filter(ide_drive_t *drive) ...@@ -574,13 +574,14 @@ static u8 hpt3xx_udma_filter(ide_drive_t *drive)
if (!HPT370_ALLOW_ATA100_5 || if (!HPT370_ALLOW_ATA100_5 ||
check_in_drive_list(drive, bad_ata100_5)) check_in_drive_list(drive, bad_ata100_5))
return ATA_UDMA4; return ATA_UDMA4;
/* else: fall through */
case HPT372 : case HPT372 :
case HPT372A: case HPT372A:
case HPT372N: case HPT372N:
case HPT374 : case HPT374 :
if (ata_id_is_sata(drive->id)) if (ata_id_is_sata(drive->id))
mask &= ~0x0e; mask &= ~0x0e;
/* Fall thru */ /* fall through */
default: default:
return mask; return mask;
} }
...@@ -600,7 +601,7 @@ static u8 hpt3xx_mdma_filter(ide_drive_t *drive) ...@@ -600,7 +601,7 @@ static u8 hpt3xx_mdma_filter(ide_drive_t *drive)
case HPT374 : case HPT374 :
if (ata_id_is_sata(drive->id)) if (ata_id_is_sata(drive->id))
return 0x00; return 0x00;
/* Fall thru */ /* else: fall through */
default: default:
return 0x07; return 0x07;
} }
......
...@@ -427,6 +427,7 @@ static int ide_floppy_get_capacity(ide_drive_t *drive) ...@@ -427,6 +427,7 @@ static int ide_floppy_get_capacity(ide_drive_t *drive)
* (maintains previous driver behaviour) * (maintains previous driver behaviour)
*/ */
break; break;
/* else: fall through */
case CAPACITY_CURRENT: case CAPACITY_CURRENT:
/* Normal Zip/LS-120 disks */ /* Normal Zip/LS-120 disks */
if (memcmp(cap_desc, &floppy->cap_desc, 8)) if (memcmp(cap_desc, &floppy->cap_desc, 8))
......
...@@ -460,7 +460,6 @@ void do_ide_request(struct request_queue *q) ...@@ -460,7 +460,6 @@ void do_ide_request(struct request_queue *q)
struct ide_host *host = hwif->host; struct ide_host *host = hwif->host;
struct request *rq = NULL; struct request *rq = NULL;
ide_startstop_t startstop; ide_startstop_t startstop;
unsigned long queue_run_ms = 3; /* old plug delay */
spin_unlock_irq(q->queue_lock); spin_unlock_irq(q->queue_lock);
...@@ -480,9 +479,6 @@ void do_ide_request(struct request_queue *q) ...@@ -480,9 +479,6 @@ void do_ide_request(struct request_queue *q)
prev_port = hwif->host->cur_port; prev_port = hwif->host->cur_port;
if (drive->dev_flags & IDE_DFLAG_SLEEPING && if (drive->dev_flags & IDE_DFLAG_SLEEPING &&
time_after(drive->sleep, jiffies)) { time_after(drive->sleep, jiffies)) {
unsigned long left = jiffies - drive->sleep;
queue_run_ms = jiffies_to_msecs(left + 1);
ide_unlock_port(hwif); ide_unlock_port(hwif);
goto plug_device; goto plug_device;
} }
......
...@@ -142,6 +142,7 @@ static void ide_classify_atapi_dev(ide_drive_t *drive) ...@@ -142,6 +142,7 @@ static void ide_classify_atapi_dev(ide_drive_t *drive)
} }
/* Early cdrom models used zero */ /* Early cdrom models used zero */
type = ide_cdrom; type = ide_cdrom;
/* fall through */
case ide_cdrom: case ide_cdrom:
drive->dev_flags |= IDE_DFLAG_REMOVABLE; drive->dev_flags |= IDE_DFLAG_REMOVABLE;
#ifdef CONFIG_PPC #ifdef CONFIG_PPC
......
...@@ -1746,7 +1746,6 @@ static void idetape_setup(ide_drive_t *drive, idetape_tape_t *tape, int minor) ...@@ -1746,7 +1746,6 @@ static void idetape_setup(ide_drive_t *drive, idetape_tape_t *tape, int minor)
{ {
unsigned long t; unsigned long t;
int speed; int speed;
int buffer_size;
u16 *ctl = (u16 *)&tape->caps[12]; u16 *ctl = (u16 *)&tape->caps[12];
ide_debug_log(IDE_DBG_FUNC, "minor: %d", minor); ide_debug_log(IDE_DBG_FUNC, "minor: %d", minor);
...@@ -1781,7 +1780,6 @@ static void idetape_setup(ide_drive_t *drive, idetape_tape_t *tape, int minor) ...@@ -1781,7 +1780,6 @@ static void idetape_setup(ide_drive_t *drive, idetape_tape_t *tape, int minor)
*ctl /= 2; *ctl /= 2;
tape->buffer_size = *ctl * tape->blk_size; tape->buffer_size = *ctl * tape->blk_size;
} }
buffer_size = tape->buffer_size;
/* select the "best" DSC read/write polling freq */ /* select the "best" DSC read/write polling freq */
speed = max(*(u16 *)&tape->caps[14], *(u16 *)&tape->caps[8]); speed = max(*(u16 *)&tape->caps[14], *(u16 *)&tape->caps[8]);
......
...@@ -128,7 +128,7 @@ ide_startstop_t do_rw_taskfile(ide_drive_t *drive, struct ide_cmd *orig_cmd) ...@@ -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); return pre_task_out_intr(drive, cmd);
} }
handler = task_pio_intr; handler = task_pio_intr;
/* fall-through */ /* fall through */
case ATA_PROT_NODATA: case ATA_PROT_NODATA:
if (handler == NULL) if (handler == NULL)
handler = task_no_data_intr; 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,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; hwif->expiry = dma_ops->dma_timer_expiry;
ide_execute_command(drive, cmd, ide_dma_intr, 2 * WAIT_CMD); ide_execute_command(drive, cmd, ide_dma_intr, 2 * WAIT_CMD);
dma_ops->dma_start(drive); dma_ops->dma_start(drive);
/* fall through */
default: default:
return ide_started; return ide_started;
} }
......
...@@ -494,6 +494,7 @@ static int init_chipset_sis5513(struct pci_dev *dev) ...@@ -494,6 +494,7 @@ static int init_chipset_sis5513(struct pci_dev *dev)
pci_read_config_byte(dev, 0x09, &reg); pci_read_config_byte(dev, 0x09, &reg);
if ((reg & 0x0f) != 0x00) if ((reg & 0x0f) != 0x00)
pci_write_config_byte(dev, 0x09, reg&0xf0); pci_write_config_byte(dev, 0x09, reg&0xf0);
/* fall through */
case ATA_16: case ATA_16:
/* force per drive recovery and active timings /* force per drive recovery and active timings
needed on ATA_33 and below chips */ needed on ATA_33 and below chips */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment