LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 2/4] drivers/net: Drop unnecessary continue
@ 2007-11-14 8:14 Julia Lawall
0 siblings, 0 replies; only message in thread
From: Julia Lawall @ 2007-11-14 8:14 UTC (permalink / raw)
To: davem, linux-kernel, kernel-janitors
From: Julia Lawall <julia@diku.dk>
Continue is not needed at the bottom of a loop.
The semantic patch implementing this change is as follows:
@@
statement S;
@@
for (...;...;...) {
...
if (...)
- {
S
- continue;
- }
}
Signed-off-by: Julia Lawall <julia@diku.dk>
---
diff -u -p -b -B a/drivers/net/ni65.c b/drivers/net/ni65.c
--- a/drivers/net/ni65.c 2007-10-22 11:25:14.000000000 +0200
+++ b/drivers/net/ni65.c 2007-11-13 22:49:02.000000000 +0100
@@ -427,10 +427,8 @@ static int __init ni65_probe1(struct net
}
if(cards[i].vendor_id) {
for(j=0;j<3;j++)
- if(inb(ioaddr+cards[i].addr_offset+j) != cards[i].vendor_id[j]) {
+ if(inb(ioaddr+cards[i].addr_offset+j) != cards[i].vendor_id[j])
release_region(ioaddr, cards[i].total_size);
- continue;
- }
}
break;
}
diff -u -p -b -B a/drivers/net/s2io.c b/drivers/net/s2io.c
--- a/drivers/net/s2io.c 2007-10-22 11:25:15.000000000 +0200
+++ b/drivers/net/s2io.c 2007-11-13 22:49:53.000000000 +0100
@@ -3599,10 +3599,8 @@ static void restore_xmsi_data(struct s2i
writeq(nic->msix_info[i].data, &bar0->xmsi_data);
val64 = (s2BIT(7) | s2BIT(15) | vBIT(i, 26, 6));
writeq(val64, &bar0->xmsi_access);
- if (wait_for_msix_trans(nic, i)) {
+ if (wait_for_msix_trans(nic, i))
DBG_PRINT(ERR_DBG, "failed in %s\n", __FUNCTION__);
- continue;
- }
}
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-11-14 8:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-14 8:14 [PATCH 2/4] drivers/net: Drop unnecessary continue Julia Lawall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).