LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Julia Lawall <julia@diku.dk>
To: davem@davemloft.net, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: [PATCH 2/4] drivers/net: Drop unnecessary continue
Date: Wed, 14 Nov 2007 09:14:35 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.4.64.0711140914000.26019@ask.diku.dk> (raw)
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;
- }
}
}
reply other threads:[~2007-11-14 8:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0711140914000.26019@ask.diku.dk \
--to=julia@diku.dk \
--cc=davem@davemloft.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--subject='Re: [PATCH 2/4] drivers/net: Drop unnecessary continue' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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).