hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/ide/ide-taskfile.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) 2000-2002 Michael Cornwell <cornwell@acm.org>
34 * Copyright (C) 2000-2002 Andre Hedrick <andre@linux-ide.org>
....@@ -128,7 +129,7 @@
128129 return pre_task_out_intr(drive, cmd);
129130 }
130131 handler = task_pio_intr;
131
- /* fall through */
132
+ fallthrough;
132133 case ATA_PROT_NODATA:
133134 if (handler == NULL)
134135 handler = task_no_data_intr;
....@@ -140,7 +141,7 @@
140141 hwif->expiry = dma_ops->dma_timer_expiry;
141142 ide_execute_command(drive, cmd, ide_dma_intr, 2 * WAIT_CMD);
142143 dma_ops->dma_start(drive);
143
- /* fall through */
144
+ fallthrough;
144145 default:
145146 return ide_started;
146147 }
....@@ -228,7 +229,6 @@
228229 ide_hwif_t *hwif = drive->hwif;
229230 struct scatterlist *sg = hwif->sg_table;
230231 struct scatterlist *cursg = cmd->cursg;
231
- unsigned long uninitialized_var(flags);
232232 struct page *page;
233233 unsigned int offset;
234234 u8 *buf;
....@@ -440,7 +440,7 @@
440440 goto put_req;
441441 }
442442
443
- rq->special = cmd;
443
+ ide_req(rq)->special = cmd;
444444 cmd->rq = rq;
445445
446446 blk_execute_rq(drive->queue, NULL, rq, 0);
....@@ -579,10 +579,10 @@
579579 goto abort;
580580 }
581581 cmd.tf_flags |= IDE_TFLAG_MULTI_PIO;
582
- /* fall through */
582
+ fallthrough;
583583 case TASKFILE_OUT:
584584 cmd.protocol = ATA_PROT_PIO;
585
- /* fall through */
585
+ fallthrough;
586586 case TASKFILE_OUT_DMAQ:
587587 case TASKFILE_OUT_DMA:
588588 cmd.tf_flags |= IDE_TFLAG_WRITE;
....@@ -598,10 +598,10 @@
598598 goto abort;
599599 }
600600 cmd.tf_flags |= IDE_TFLAG_MULTI_PIO;
601
- /* fall through */
601
+ fallthrough;
602602 case TASKFILE_IN:
603603 cmd.protocol = ATA_PROT_PIO;
604
- /* fall through */
604
+ fallthrough;
605605 case TASKFILE_IN_DMAQ:
606606 case TASKFILE_IN_DMA:
607607 nsect = taskin / SECTOR_SIZE;