summaryrefslogtreecommitdiffstats
path: root/drivers/staging/vt6655/ioctl.c
diff options
context:
space:
mode:
authorJoe Perches2011-04-10 23:31:32 +0200
committerGreg Kroah-Hartman2011-04-26 01:58:34 +0200
commit9fc86028fa21f8831c0fdc701732cf491da1202c (patch)
tree36b1aed544c06bda3a0134e8a023115ca957e49b /drivers/staging/vt6655/ioctl.c
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/lwfinger/linux-staging in... (diff)
downloadkernel-qcow2-linux-9fc86028fa21f8831c0fdc701732cf491da1202c.tar.gz
kernel-qcow2-linux-9fc86028fa21f8831c0fdc701732cf491da1202c.tar.xz
kernel-qcow2-linux-9fc86028fa21f8831c0fdc701732cf491da1202c.zip
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/ioctl.c')
-rw-r--r--drivers/staging/vt6655/ioctl.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/staging/vt6655/ioctl.c b/drivers/staging/vt6655/ioctl.c
index 5624a41e3d5e..a74833d0eeab 100644
--- a/drivers/staging/vt6655/ioctl.c
+++ b/drivers/staging/vt6655/ioctl.c
@@ -91,7 +91,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_from_user(&sScanCmd, pReq->data, sizeof(SCmdScan))) {
result = -EFAULT;
break;
- };
+ }
pItemSSID = (PWLAN_IE_SSID)sScanCmd.ssid;
if (pItemSSID->len != 0) {
@@ -128,7 +128,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_from_user(&sZoneTypeCmd, pReq->data, sizeof(SCmdZoneTypeSet))) {
result = -EFAULT;
break;
- };
+ }
if(sZoneTypeCmd.bWrite==true) {
//////write zonetype
@@ -167,7 +167,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_to_user(pReq->data, &sZoneTypeCmd, sizeof(SCmdZoneTypeSet))) {
result = -EFAULT;
break;
- };
+ }
}
break;
@@ -186,7 +186,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_from_user(&sJoinCmd, pReq->data, sizeof(SCmdBSSJoin))) {
result = -EFAULT;
break;
- };
+ }
pItemSSID = (PWLAN_IE_SSID)sJoinCmd.ssid;
memset(pMgmt->abyDesireSSID, 0, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1);
@@ -234,7 +234,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_from_user(&sWEPCmd, pReq->data, sizeof(SCmdSetWEP))) {
result = -EFAULT;
break;
- };
+ }
if (sWEPCmd.bEnableWep != true) {
pDevice->bEncryptionEnable = false;
pDevice->eEncryptionStatus = Ndis802_11EncryptionDisabled;
@@ -300,7 +300,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_to_user(pReq->data, &sLinkStatus, sizeof(SCmdLinkStatus))) {
result = -EFAULT;
break;
- };
+ }
break;
@@ -317,7 +317,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_to_user(pReq->data, &sList, sizeof(SBSSIDList))) {
result = -EFAULT;
break;
- };
+ }
pReq->wResult = 0;
break;
@@ -325,7 +325,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_from_user(&sList, pReq->data, sizeof(SBSSIDList))) {
result = -EFAULT;
break;
- };
+ }
pList = (PSBSSIDList)kmalloc(sizeof(SBSSIDList) + (sList.uItem * sizeof(SBSSIDItem)), (int)GFP_ATOMIC);
if (pList == NULL) {
result = -ENOMEM;
@@ -367,7 +367,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_to_user(pReq->data, pList, sizeof(SBSSIDList) + (sList.uItem * sizeof(SBSSIDItem)))) {
result = -EFAULT;
break;
- };
+ }
kfree(pList);
pReq->wResult = 0;
break;
@@ -376,14 +376,14 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_to_user(pReq->data, &(pDevice->s802_11Counter), sizeof(SDot11MIBCount))) {
result = -EFAULT;
break;
- };
+ }
break;
case WLAN_CMD_GET_STAT:
if (copy_to_user(pReq->data, &(pDevice->scStatistic), sizeof(SStatCounter))) {
result = -EFAULT;
break;
- };
+ }
break;
case WLAN_CMD_STOP_MAC:
@@ -427,7 +427,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_from_user(&sValue, pReq->data, sizeof(SCmdValue))) {
result = -EFAULT;
break;
- };
+ }
if (sValue.dwValue == 1) {
if (vt6655_hostap_set_hostapd(pDevice, 1, 1) == 0){
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable HOSTAP\n");
@@ -455,7 +455,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_from_user(&sValue, pReq->data, sizeof(SCmdValue))) {
result = -EFAULT;
break;
- };
+ }
if (sValue.dwValue == 1) {
pDevice->bEnable8021x = true;
@@ -475,7 +475,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_from_user(&sValue, pReq->data, sizeof(SCmdValue))) {
result = -EFAULT;
break;
- };
+ }
if (sValue.dwValue == 1) {
pDevice->bEnableHostWEP = true;
@@ -494,7 +494,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_from_user(&sValue, pReq->data, sizeof(SCmdValue))) {
result = -EFAULT;
break;
- };
+ }
if (sValue.dwValue == 1) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "up wpadev\n");
memcpy(pDevice->wpadev->dev_addr, pDevice->dev->dev_addr, ETH_ALEN);
@@ -519,7 +519,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_from_user(&sStartAPCmd, pReq->data, sizeof(SCmdStartAP))) {
result = -EFAULT;
break;
- };
+ }
if (sStartAPCmd.wBSSType == AP) {
pMgmt->eConfigMode = WMAC_CONFIG_AP;
@@ -612,7 +612,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_to_user(pReq->data, &sNodeList, sizeof(SNodeList))) {
result = -EFAULT;
break;
- };
+ }
pReq->wResult = 0;
break;
@@ -621,7 +621,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_from_user(&sNodeList, pReq->data, sizeof(SNodeList))) {
result = -EFAULT;
break;
- };
+ }
pNodeList = (PSNodeList)kmalloc(sizeof(SNodeList) + (sNodeList.uItem * sizeof(SNodeItem)), (int)GFP_ATOMIC);
if (pNodeList == NULL) {
result = -ENOMEM;
@@ -661,7 +661,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_to_user(pReq->data, pNodeList, sizeof(SNodeList) + (sNodeList.uItem * sizeof(SNodeItem)))) {
result = -EFAULT;
break;
- };
+ }
kfree(pNodeList);
pReq->wResult = 0;
break;