[PATCH] scsi: Fix semicolon.cocci warnings
From: Wen Yang
Date: Wed Nov 28 2018 - 05:01:22 EST
Remove unneeded semicolon.
drivers/scsi/bnx2fc/bnx2fc_fcoe.c:947:4-5: Unneeded semicolon
drivers/scsi/bnx2fc/bnx2fc_fcoe.c:967:4-5: Unneeded semicolon
drivers/scsi/sgiwd93.c:190:2-3: Unneeded semicolon
drivers/scsi/aha1542.c:521:2-3: Unneeded semicolon
drivers/scsi/aha1542.c:548:2-3: Unneeded semicolon
drivers/scsi/aha1542.c:571:2-3: Unneeded semicolon
drivers/scsi/aha1542.c:264:2-3: Unneeded semicolon
drivers/scsi/aha1542.c:304:3-4: Unneeded semicolon
drivers/scsi/aha1542.c:367:2-3: Unneeded semicolon
drivers/scsi/aha1542.c:604:2-3: Unneeded semicolon
drivers/scsi/aha1542.c:622:2-3: Unneeded semicolon
drivers/scsi/aha1542.c:640:2-3: Unneeded semicolon
drivers/scsi/aha1542.c:464:3-4: Unneeded semicolon
drivers/scsi/aha1542.c:476:2-3: Unneeded semicolon
drivers/scsi/aha1542.c:506:2-3: Unneeded semicolon
Generated by: scripts/coccinelle/misc/semicolon.cocci
Signed-off-by: Wen Yang <wen.yang99@xxxxxxxxxx>
CC: Julia Lawall <julia.lawall@xxxxxxx>
CC: "James E.J. Bottomley" <jejb@xxxxxxxxxxxxxxxxxx>
CC: "Martin K. Petersen" <martin.petersen@xxxxxxxxxx>
CC: linux-scsi@xxxxxxxxxxxxxxx
CC: linux-kernel@xxxxxxxxxxxxxxx
---
drivers/scsi/aha1542.c | 24 ++++++++++++------------
drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 4 ++--
drivers/scsi/sgiwd93.c | 2 +-
3 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c
index 41add33e3f1f..b5685a7315b3 100644
--- a/drivers/scsi/aha1542.c
+++ b/drivers/scsi/aha1542.c
@@ -261,7 +261,7 @@ static irqreturn_t aha1542_interrupt(int irq, void *dev_id)
if (flag & SCRD)
printk("SCRD ");
printk("status %02x\n", inb(STATUS(sh->io_port)));
- };
+ }
#endif
number_serviced = 0;
@@ -301,7 +301,7 @@ static irqreturn_t aha1542_interrupt(int irq, void *dev_id)
if (!number_serviced)
shost_printk(KERN_WARNING, sh, "interrupt received, but no mail.\n");
return IRQ_HANDLED;
- };
+ }
mbo = (scsi2int(mb[mbi].ccbptr) - (isa_virt_to_bus(&ccb[0]))) / sizeof(struct ccb);
mbistatus = mb[mbi].status;
@@ -364,7 +364,7 @@ static irqreturn_t aha1542_interrupt(int irq, void *dev_id)
far as queuecommand is concerned */
my_done(tmp_cmd);
number_serviced++;
- };
+ }
}
static int aha1542_queuecommand(struct Scsi_Host *sh, struct scsi_cmnd *cmd)
@@ -461,7 +461,7 @@ static int aha1542_queuecommand(struct Scsi_Host *sh, struct scsi_cmnd *cmd)
any2scsi(cptr[i].dataptr, isa_page_to_bus(sg_page(sg))
+ sg->offset);
any2scsi(cptr[i].datalen, sg->length);
- };
+ }
any2scsi(ccb[mbo].datalen, sg_count * sizeof(struct chain));
any2scsi(ccb[mbo].dataptr, isa_virt_to_bus(cptr));
#ifdef DEBUG
@@ -473,7 +473,7 @@ static int aha1542_queuecommand(struct Scsi_Host *sh, struct scsi_cmnd *cmd)
cmd->host_scribble = NULL;
any2scsi(ccb[mbo].datalen, 0);
any2scsi(ccb[mbo].dataptr, 0);
- };
+ }
ccb[mbo].idlun = (target & 7) << 5 | direction | (lun & 7); /*SCSI Target Id */
ccb[mbo].rsalen = 16;
ccb[mbo].linkptr[0] = ccb[mbo].linkptr[1] = ccb[mbo].linkptr[2] = 0;
@@ -503,7 +503,7 @@ static void setup_mailboxes(struct Scsi_Host *sh)
for (i = 0; i < AHA1542_MAILBOXES; i++) {
mb[i].status = mb[AHA1542_MAILBOXES + i].status = 0;
any2scsi(mb[i].ccbptr, isa_virt_to_bus(&ccb[i]));
- };
+ }
aha1542_intr_reset(sh->io_port); /* reset interrupts, so they don't block */
any2scsi((mb_cmd + 2), isa_virt_to_bus(mb));
if (aha1542_out(sh->io_port, mb_cmd, 5))
@@ -518,7 +518,7 @@ static int aha1542_getconfig(struct Scsi_Host *sh)
i = inb(STATUS(sh->io_port));
if (i & DF) {
i = inb(DATA(sh->io_port));
- };
+ }
aha1542_outb(sh->io_port, CMD_RETCONF);
aha1542_in(sh->io_port, inquiry_result, 3, 0);
if (!wait_mask(INTRFLAGS(sh->io_port), INTRMASK, HACC, 0, 0))
@@ -545,7 +545,7 @@ static int aha1542_getconfig(struct Scsi_Host *sh)
default:
shost_printk(KERN_ERR, sh, "Unable to determine DMA channel.\n");
return -1;
- };
+ }
switch (inquiry_result[1]) {
case 0x40:
sh->irq = 15;
@@ -568,7 +568,7 @@ static int aha1542_getconfig(struct Scsi_Host *sh)
default:
shost_printk(KERN_ERR, sh, "Unable to determine IRQ level.\n");
return -1;
- };
+ }
sh->this_id = inquiry_result[2] & 7;
return 0;
}
@@ -601,7 +601,7 @@ static int aha1542_mbenable(struct Scsi_Host *sh)
if (aha1542_out(sh->io_port, mbenable_cmd, 3))
goto fail;
- };
+ }
while (0) {
fail:
shost_printk(KERN_ERR, sh, "Mailbox init failed\n");
@@ -619,7 +619,7 @@ static int aha1542_query(struct Scsi_Host *sh)
i = inb(STATUS(sh->io_port));
if (i & DF) {
i = inb(DATA(sh->io_port));
- };
+ }
aha1542_outb(sh->io_port, CMD_INQUIRY);
aha1542_in(sh->io_port, inquiry_result, 4, 0);
if (!wait_mask(INTRFLAGS(sh->io_port), INTRMASK, HACC, 0, 0))
@@ -637,7 +637,7 @@ static int aha1542_query(struct Scsi_Host *sh)
if (inquiry_result[0] == 0x43) {
shost_printk(KERN_INFO, sh, "Emulation mode not supported for AHA-1740 hardware, use aha1740 driver instead.\n");
return 1;
- };
+ }
/* Always call this - boards that do not support extended bios translation
will ignore the command, and we will set the proper default */
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index cd160f2ec75d..d12405e85fd5 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
@@ -944,7 +944,7 @@ static void bnx2fc_indicate_netevent(void *context, unsigned long event,
*/
if (interface->enabled)
fcoe_ctlr_link_up(ctlr);
- };
+ }
} else if (fcoe_ctlr_link_down(ctlr)) {
switch (cdev->enabled) {
case FCOE_CTLR_DISABLED:
@@ -964,7 +964,7 @@ static void bnx2fc_indicate_netevent(void *context, unsigned long event,
put_cpu();
fcoe_clean_pending_queue(lport);
wait_for_upload = 1;
- };
+ }
}
}
mutex_unlock(&bnx2fc_dev_lock);
diff --git a/drivers/scsi/sgiwd93.c b/drivers/scsi/sgiwd93.c
index 5ed696dc9bbd..cd959b951854 100644
--- a/drivers/scsi/sgiwd93.c
+++ b/drivers/scsi/sgiwd93.c
@@ -187,7 +187,7 @@ static inline void init_hpc_chain(struct ip22_hostdata *hdata)
hcp++;
dma += sizeof(struct hpc_chunk);
start += sizeof(struct hpc_chunk);
- };
+ }
hcp--;
hcp->desc.pnext = hdata->dma;
}
--
2.19.1