diff options
author | Joe Perches <joe@perches.com> | 2011-04-10 14:31:32 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-04-25 16:58:34 -0700 |
commit | 9fc86028fa21f8831c0fdc701732cf491da1202c (patch) | |
tree | 36b1aed544c06bda3a0134e8a023115ca957e49b /drivers/staging/vt6655/device_main.c | |
parent | 60b0fa1af9b323f096fb5335f33cc5b4a8f0198d (diff) |
staging: Remove unnecessary semicolons when if (foo) {...};
Done via perl script:
$ cat remove_semi_if.pl
my $match_balanced_parentheses = qr/(\((?:[^\(\)]++|(?-1))*\))/;
my $match_balanced_braces = qr/(\{(?:[^\{\}]++|(?-1))*\})/;
foreach my $file (@ARGV) {
my $f;
my $text;
my $oldtext;
next if ((-d $file));
open($f, '<', $file)
or die "$P: Can't open $file for read\n";
$oldtext = do { local($/) ; <$f> };
close($f);
next if ($oldtext eq "");
$text = $oldtext;
my $count = 0;
do {
$count = 0;
$count += $text =~ s@\b(if\s*${match_balanced_parentheses}\s*)${match_balanced_braces}\s*;@"$1$3"@egx;
} while ($count > 0);
if ($text ne $oldtext) {
my $newfile = $file;
open($f, '>', $newfile)
or die "$P: Can't open $newfile for write\n";
print $f $text;
close($f);
}
}
$
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/vt6655/device_main.c')
-rw-r--r-- | drivers/staging/vt6655/device_main.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index ad39c8727e9..3d2a9ba16b1 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -900,7 +900,7 @@ static bool device_release_WPADEV(PSDevice pDevice) if(ii>20) break; } - }; + } return true; } @@ -1446,7 +1446,7 @@ static void device_init_defrag_cb(PSDevice pDevice) { if (!device_alloc_frag_buf(pDevice, pDeF)) { DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc frag bufs\n", pDevice->dev->name); - }; + } } pDevice->cbDFCB = CB_MAX_RX_FRAG; pDevice->cbFreeDFCB = pDevice->cbDFCB; @@ -2104,7 +2104,7 @@ static int device_dma0_tx_80211(struct sk_buff *skb, struct net_device *dev) { dev_kfree_skb_irq(skb); spin_unlock_irq(&pDevice->lock); return 0; - }; + } cbMPDULen = skb->len; pbMPDU = skb->data; @@ -2136,7 +2136,7 @@ bool device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, unsigned int uNodeI if (pDevice->bStopTx0Pkt == true) { dev_kfree_skb_irq(skb); return false; - }; + } if (AVAIL_TD(pDevice, TYPE_TXDMA0) <= 0) { dev_kfree_skb_irq(skb); @@ -2865,7 +2865,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) { pDevice->bBeaconSent = false; if (pDevice->bEnablePSMode) { PSbIsNextTBTTWakeUp((void *)pDevice); - }; + } if ((pDevice->eOPMode == OP_MODE_AP) || (pDevice->eOPMode == OP_MODE_ADHOC)) { @@ -2876,7 +2876,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) { if (pDevice->eOPMode == OP_MODE_ADHOC && pDevice->pMgmt->wCurrATIMWindow > 0) { // todo adhoc PS mode - }; + } } @@ -2885,7 +2885,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) { if (pDevice->eOPMode == OP_MODE_ADHOC) { pDevice->bIsBeaconBufReadySet = false; pDevice->cbBeaconBufReadySetCnt = 0; - }; + } if (pDevice->eOPMode == OP_MODE_AP) { if(pMgmt->byDTIMCount > 0) { |