Done via perl script:
$ cat remove_semi_for.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(for\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>
subdev_8255_cb,
(unsigned long)(dev->iobase +
SIZE_8255 * i));
subdev_8255_cb,
(unsigned long)(dev->iobase +
SIZE_8255 * i));
subdev_8255_init(dev, dev->subdevices + i, subdev_8255_cb,
(unsigned long)(dev->iobase + SIZE_8255 * i));
((dev->subdevices) + i)->insn_config = subdev_3724_insn_config;
subdev_8255_init(dev, dev->subdevices + i, subdev_8255_cb,
(unsigned long)(dev->iobase + SIZE_8255 * i));
((dev->subdevices) + i)->insn_config = subdev_3724_insn_config;
if (!pBSS->bActive)
continue;
cbListCount++;
if (!pBSS->bActive)
continue;
cbListCount++;
sList.uItem = cbListCount;
if (copy_to_user(pReq->data, &sList, sizeof(SBSSIDList))) {
result = -EFAULT;
sList.uItem = cbListCount;
if (copy_to_user(pReq->data, &sList, sizeof(SBSSIDList))) {
result = -EFAULT;
if (!pNode->bActive)
continue;
cbListCount++;
if (!pNode->bActive)
continue;
cbListCount++;
sNodeList.uItem = cbListCount;
if (copy_to_user(pReq->data, &sNodeList, sizeof(SNodeList))) {
sNodeList.uItem = cbListCount;
if (copy_to_user(pReq->data, &sNodeList, sizeof(SNodeList))) {
if (jj >= pNodeList->uItem)
break;
}
if (jj >= pNodeList->uItem)
break;
}
if (copy_to_user(pReq->data, pNodeList, sizeof(SNodeList) + (sNodeList.uItem * sizeof(SNodeItem)))) {
result = -EFAULT;
break;
if (copy_to_user(pReq->data, pNodeList, sizeof(SNodeList) + (sNodeList.uItem * sizeof(SNodeItem)))) {
result = -EFAULT;
break;
// Round start index down to nearest even number
// Round start index down to nearest even number
if (!pBSS->bActive)
continue;
count++;
if (!pBSS->bActive)
continue;
count++;
pBuf = kcalloc(count, sizeof(struct viawget_scan_result), (int)GFP_ATOMIC);
pBuf = kcalloc(count, sizeof(struct viawget_scan_result), (int)GFP_ATOMIC);
if (!pBSS->bActive)
continue;
cbListCount++;
if (!pBSS->bActive)
continue;
cbListCount++;
sList.uItem = cbListCount;
if (copy_to_user(pReq->data, &sList, sizeof(SBSSIDList))) {
result = -EFAULT;
sList.uItem = cbListCount;
if (copy_to_user(pReq->data, &sList, sizeof(SBSSIDList))) {
result = -EFAULT;
if (!pNode->bActive)
continue;
cbListCount++;
if (!pNode->bActive)
continue;
cbListCount++;
sNodeList.uItem = cbListCount;
if (copy_to_user(pReq->data, &sNodeList, sizeof(SNodeList))) {
sNodeList.uItem = cbListCount;
if (copy_to_user(pReq->data, &sNodeList, sizeof(SNodeList))) {
if (jj >= pNodeList->uItem)
break;
}
if (jj >= pNodeList->uItem)
break;
}
if (copy_to_user(pReq->data, pNodeList, sizeof(SNodeList) + (sNodeList.uItem * sizeof(SNodeItem)))) {
result = -EFAULT;
break;
if (copy_to_user(pReq->data, pNodeList, sizeof(SNodeList) + (sNodeList.uItem * sizeof(SNodeItem)))) {
result = -EFAULT;
break;
}
wEndIndex = (WORD)ii;
}
}
wEndIndex = (WORD)ii;
}
// Round start index down to nearest even number
// Round start index down to nearest even number
if (!pBSS->bActive)
continue;
count++;
if (!pBSS->bActive)
continue;
count++;
pBuf = kcalloc(count, sizeof(struct viawget_scan_result), (int)GFP_ATOMIC);
pBuf = kcalloc(count, sizeof(struct viawget_scan_result), (int)GFP_ATOMIC);
cy_as_hal_print_message(KERN_INFO "%s virt_addr=%x\n",
gpio_vma_tab[i].name,
(u32)gpio_vma_tab[i].virt_addr);
cy_as_hal_print_message(KERN_INFO "%s virt_addr=%x\n",
gpio_vma_tab[i].name,
(u32)gpio_vma_tab[i].virt_addr);
/*
* force OMAP_GPIO_126 to rleased state,
/*
* force OMAP_GPIO_126 to rleased state,