1
0
Fork 0
Commit Graph

81 Commits (eea70dbdfd578b0d0de3f033fc5381918eafc788)

Author SHA1 Message Date
Colin Ian King d6ff1b52b5 staging: vt6655: remove some redundant variables
Variables rx_sts, sq, frame and is_pspoll are being assigned but are
never used hence they are redundant and can be removed.

Cleans up clang warnings:
warning: variable 'sq' set but not used [-Wunused-but-set-variable]
warning: variable 'rx_sts' set but not used [-Wunused-but-set-variable]
warning: variable 'frame' set but not used [-Wunused-but-set-variable]
warning: variable 'is_pspoll' set but not used [-Wunused-but-set-variable]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-11 14:47:08 +02:00
Greg Kroah-Hartman dbc9f36cf7 staging: vt6655: Remove redundant license text
Now that the SPDX tag is in all vt6655 files, that identifies the
license in a specific and legally-defined manner.  So the extra GPL text
wording can be removed as it is no longer needed at all.

This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text.  And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.

No copyright headers or other non-license-description text was removed.

Cc: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-28 13:20:47 +01:00
Greg Kroah-Hartman d7c43082fc staging: vt6655: add SPDX identifiers to all vt6655 driver files
It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Update the vt6655 driver files with the correct SPDX license identifier
based on the license text in the file itself.  The SPDX identifier is a
legally binding shorthand, which can be used instead of the full boiler
plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Forest Bond <forest@alittletooquiet.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-28 13:20:47 +01:00
Varsha Rao 21971f3e0e staging: vt6655: Removes the FSF mailing address.
This patch fixes the checkpatch issue by removing the Free Software
Foundation's mailing address from the sample GPL notice. Because the FSF
has changed address in the past, and may change again. Linux already
includes a copy of the GPL.

Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:26:28 +02:00
Malcolm Priestley 9cb693f6f3 staging: vt6655: replace typedef struct tagSRxDesc
with struct vnt_rx_desc and all members the same.

volatile is removed from pointers as this generates warning
message.

Only the first four members of vnt_rx_desc need to be volatile.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:26 -07:00
Malcolm Priestley 88defe2b35 staging: vt6655: replace typedef struct tagDEVICE_RD_INFO
with struct vnt_rd_info

volatile is removed because it will generate a warning
(in any case this member is not) and renaming rd_info.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:26 -07:00
Malcolm Priestley 9fc7091cc2 staging: vt6655: replace typedef struct tagRDES1
with struct vnt_rdes1 and members
wReqCount -> req_count
wReserved -> reserved

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:26 -07:00
Malcolm Priestley de1c1862ca staging: vt6655: replace typedef struct tagRDES0
with struct vnt_rdes0 replacing members as follows
wResCount -> res_count
f15Reserved -> f15_reserved
f1Owner -> owner

big endian
f8Reserved1 -> f8_reserved1
f7Reserved -> f7_reserved

Narrowing endian differences to inside structure.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:26 -07:00
Malcolm Priestley 7135d9a76f staging: vt6655: Fix wReqCount to __le16
Should be __le16 and do and correct endian conversion.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 20:51:39 -07:00
Quentin Lambert a1c6dcda80 staging: vt6655: remove deprecated use of pci api
Replace occurences of the pci api by appropriate call to the dma api.

A simplified version of the semantic patch that finds this problem is as
follows: (http://coccinelle.lip6.fr)

@deprecated@
idexpression id;
position p;
@@

(
  pci_dma_supported@p ( id, ...)
|
  pci_alloc_consistent@p ( id, ...)
)

@bad1@
idexpression id;
position deprecated.p;
@@
...when != &id->dev
   when != pci_get_drvdata ( id )
   when != pci_enable_device ( id )
(
  pci_dma_supported@p ( id, ...)
|
  pci_alloc_consistent@p ( id, ...)
)

@depends on !bad1@
idexpression id;
expression direction;
position deprecated.p;
@@

(
- pci_dma_supported@p ( id,
+ dma_supported ( &id->dev,
...
+ , GFP_ATOMIC
  )
|
- pci_alloc_consistent@p ( id,
+ dma_alloc_coherent ( &id->dev,
...
+ , GFP_ATOMIC
  )
)

Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:41:38 +01:00
Malcolm Priestley 6d85412726 staging: vt6655: vnt_rx_data add track rsr and new_rsr errors
If not rsr & RSR_CRCOK report RX_FLAG_FAILED_FCS_CRC

If not rsr & (RSR_IVLDTYP | RSR_IVLDLEN) drop packet

If not NEWRSR_DECRYPTOK on new_rsr drop packet.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-07 17:16:59 +08:00
Malcolm Priestley e6f534bc2f staging: vt6655: remove antenna diversity functions
The vendor had disabled these functions in their last version.

On test this can be troublesome, so remove this from the driver along
with its macros and timers.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25 19:59:16 +08:00
Malcolm Priestley 01b8979244 staging: vt6655: dpc.c/h remove dead functions
s_byGetRateIdx
s_vGetDASA
s_vProcessRxMACHeader
s_bAPModeRxCtl
s_bAPModeRxData
s_bHandleRxEncryption
s_bHostWepRxEncryption
s_vProcessRxMACHeader
s_byGetRateIdx
s_vGetDASA
device_receive_frame
s_bAPModeRxCtl

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:33:35 -07:00
Malcolm Priestley ee1464902c staging: vt6655: dead code remove legacy hostap.c/h
hoatap is now supported by mac80211 in nl80211 mode

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:33:34 -07:00
Malcolm Priestley f218f40d48 staging: vt6655: vnt_rx_data: uCurrRSSI should have the value of *rssi
Fixes issue of byBBVGANew is wrong in device_intr

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:31:31 -07:00
Malcolm Priestley 33b1c8c13f staging: vt6655: mac80211 conversion: add new rx functions
vnt_receive_frame which replaces device_receive_frame

and vnt_rx_data which handles mac80211 rx data

structures ieee80211_hw, ieee80211_vif and variable rx_rate are added
in structure vnt_private

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 11:35:51 -07:00
Veronika Kabatova 1d39fe040b staging: vt6655: dpc.c: Comment fixes
Replace C99 "//" comments by "/* */", remove not
needed comments about adding code

Signed-off-by: Veronika Kabatova <veronicca114@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-28 16:09:34 +08:00
Jiayi Ye 1d06bb4e9d staging: remove unneeded parentheses around the right hand side of an assignment
In assignments such as value = (FLASH_CMD_STATUS_REG_READ << 24);, parentheses
are not needed. The Coccinelle semantic patch was used to find cases.

@r@
identifier x;
expression e1, e2;
@@

- x = (e1 << e2);
+ x = e1 << e2;

Signed-off-by: Jiayi Ye <yejiayily@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27 10:33:06 +08:00
Aya Mahfouz 87bb326ead staging: vt6655: dpc.c: replace memcpy() by ether_addr_copy() using coccinelle
This patch focuses on fixing the following warning generated
by checkpatch.pl for the file dpc.c :

Prefer ether_addr_copy() over memcpy() if the Ethernet addresses
are __aligned(2)

The changes were applied using the following coccinelle rule:

@@ expression e1, e2; @@

- memcpy(e1, e2, ETH_ALEN);
+ ether_addr_copy(e1, e2);

According to ether_addr_copy() description and functionality,
all Ethernet addresses should align to the u16 datatype.

Here is the output of pahole for the relevant datastructures:

struct tagS802_11Header {
        short unsigned int         wFrameCtl;            /*     0     2 */
        short unsigned int         wDurationID;          /*     2     2 */
        unsigned char              abyAddr1[6];          /*     4     6 */
        unsigned char              abyAddr2[6];          /*    10     6 */
        unsigned char              abyAddr3[6];          /*    16     6 */
        short unsigned int         wSeqCtl;              /*    22     2 */
        unsigned char              abyAddr4[6];          /*    24     6 */

        /* size: 30, cachelines: 1, members: 7 */
        /* last cacheline: 30 bytes */
};
struct iw_michaelmicfailure {
        __u32                      flags;                /*     0     4 */
        struct sockaddr            src_addr;             /*     4    16 */
        __u8                       tsc[8];               /*    20     8 */

        /* size: 28, cachelines: 1, members: 3 */
        /* last cacheline: 28 bytes */
};
struct sockaddr {
        sa_family_t                sa_family;            /*     0     2 */
        char                       sa_data[14];          /*     2    14 */

        /* size: 16, cachelines: 1, members: 2 */
        /* last cacheline: 16 bytes */
};

There is one thing to note though, sa_data is a char array of size 14.
And the number of bytes copied using memcpy() or ether_addr_copy()
is 6.

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:30:15 +08:00
Tobias Klauser 22981e0e5a staging: vt6655: Use net_device_stats from struct net_device
Instead of using an own copy of struct net_device_stats in struct
vnt_private, use stats from struct net_device. Also remove the thus
unnecessary device_get_stats(), as it would now just return
netdev->stats, which is the default in dev_get_stats().

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:59:18 -07:00
Malcolm Priestley a987367348 staging: vt6655: Replace typedef enum _CARD_OP_MODE eOPMode with enum nl80211_iftype op_mode.
Using the nl80211 header.

Using enum changes
OP_MODE_ADHOC -> NL80211_IFTYPE_ADHOC
OP_MODE_AP ->  NL80211_IFTYPE_AP
OP_MODE_INFRASTRUCTURE -> NL80211_IFTYPE_STATION
OP_MODE_UNKNOWN -> NL80211_IFTYPE_UNSPECIFIED

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 15:19:17 -07:00
Malcolm Priestley 9e9df6704c staging: vt6655: remove remaining comments of PLICE_DEBUG
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 13:47:31 -07:00
Joe Perches 48caf5a060 staging: vt6655: Convert DBG_PRT to pr_<level>
DBG_PRT uses are unnecessarily complex.

Convert DBG_PRT msglevel to pr_<level>.
This changes the KERN_<level> type of several uses.
It also enables dynamic_debug for the pr_debug conversions.

This patch can be a prelude to converting these pr_<level>
uses to dev_<level> as appropriate.

Other changes:

Realign arguments of these conversions.
Remove now unused static int msglevel declarations.
Remove now unused DBG_PRT #define.

Compile tested only.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17 09:43:50 -07:00
Malcolm Priestley cf76dc4b85 staging: vt6655: bssdb/datarate/dpc/power/rxtx use struct vnt_private
Replacing PSDevice.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:16 -07:00
Malcolm Priestley 0fc2a76eef staging: vt6655: Replace and remove typedef QWORD/ DQWORD
Replace the variables with u64/__le64.

The endian variant is needed in some places endian correction is
needed.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:15 -07:00
Malcolm Priestley 9a802f2edc staging: vt6655: deadcode remove undefined macro THREAD code.
Removing _RxManagementQueue, InitRxManagementQueue, MlmeThread, mlme_kill,
EnQueue and DeQueue.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 17:07:32 -07:00
Malcolm Priestley 795d644c0a staging: vt6655: remove undefined TASK_LET code
Removing all code within and function MngWorkItem.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 17:07:32 -07:00
Guillaume Clement bfd7a28190 staging: vt6655: Remove spaces before quoted newlines
This fixes several spaces added just before a newline in debug
strings, reported by checkpatch.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:21:27 -07:00
Guillaume Clement 6b7112719f staging: vt6655: Add missing blank lines after declarations
This patch fixes the missing blank lines after declarations in vt6655
reported by checkpatch.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:21:27 -07:00
James A Shackleford 04d521970b staging: vt6655: fix sparse warning for static declarations
This patch fixes the following sparse warnings:

dpc.c:65:21: warning: symbol 'acbyRxRate' was not declared. Should it be static?
dpc.c:272:9: warning: symbol 'MngWorkItem' was not declared. Should it be static?
dpc.c:288:1: warning: symbol 'device_receive_frame' was not declared. Should it be static?

Signed-off-by: James A Shackleford <shack@linux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 16:33:44 -07:00
Guido Martínez bc5cf65635 staging: vt6655: fix checkpatch bracing issues
This patchs fixes tons of warnings such as:

  WARNING: braces {} are not necessary for single statement blocks
  #354: FILE: drivers/staging/vt6655/wmgr.c:354:
  +       for (ii = 0; ii < WLAN_BSSID_LEN; ii++) {
  +               pMgmt->abyDesireBSSID[ii] = 0xFF;
  +       }

Please note: this patch only fixes bracing issues (and there is still a
lot to do); so if you run checkpatch it _will_ throw a lot of errors.
Use --test-only=braces

Signed-off-by: Guido Martínez <guido@vanguardiasur.com.ar>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 13:26:37 -07:00
Guido Martínez 4e8a7e5fc2 staging: vt6655: remove dead code
Remove dead code in many places on this driver.

Signed-off-by: Guido Martínez <guido@vanguardiasur.com.ar>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 13:25:58 -07:00
Malcolm Priestley 35a9562b02 staging: vt6655: 64 bit fixes TKIP mic correct sizeof long.
Correct to endian base type __le32.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-08 22:31:31 -08:00
Malcolm Priestley d0daef301d staging: vt6655: 64 bit fixes :TKIP mode micheal.c sizeof long.
Fix MIC_vGetMIC and MIC_vInit to u32

Fix calling functions to u32

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-08 22:31:31 -08:00
Teodora Baluta 88cc85075d staging: vt6655: remove unneeded semicolon
This patch deletes any unneeded semicolons in driver vt6655 as detected
by coccinelle.

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-10 11:15:08 -08:00
Teodora Baluta 1208f14a37 staging: vt6655: delete explicit comparison to bool
This patch fixes the following type of coccinelle detected warnings for
driver vt6655:

WARNING: Comparison to bool

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-10 11:15:08 -08:00
Joe Perches 8329419a29 Staging: Convert uses of compare_ether_addr to ether_addr_equal
Preliminary to removing compare_ether_addr altogether:

Use the new bool function ether_addr_equal to add
some clarity and reduce the likelihood for misuse
of compare_ether_addr for sorting.

Additionally:

Used is_zero_ether_addr, removed now unused variable
Converted uses of &foo[0] to foo

Done via cocci script: (and a little typing)

$ cat compare_ether_addr.cocci
@@
expression a,b;
@@
-	!compare_ether_addr(a, b)
+	ether_addr_equal(a, b)

@@
expression a,b;
@@
-	compare_ether_addr(a, b)
+	!ether_addr_equal(a, b)

@@
expression a,b;
@@
-	!ether_addr_equal(a, b) == 0
+	ether_addr_equal(a, b)

@@
expression a,b;
@@
-	!ether_addr_equal(a, b) != 0
+	!ether_addr_equal(a, b)

@@
expression a,b;
@@
-	ether_addr_equal(a, b) == 0
+	!ether_addr_equal(a, b)

@@
expression a,b;
@@
-	ether_addr_equal(a, b) != 0
+	ether_addr_equal(a, b)

@@
expression a,b;
@@
-	!!ether_addr_equal(a, b)
+	ether_addr_equal(a, b)

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17 07:47:44 -07:00
Joe Perches 96d69e201b staging: vt6655: Remove unnecessary blank lines
Remove a bunch of useless vertical whitespace.

Convert 3 or more consecutive newlines to 2.
Remove blank lines after open brace and before close brace.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 11:16:17 -07:00
Joe Perches a730753880 staging: vt6655: Remove commented out if()s
Commented out code is just noise.  Remove them.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 11:16:17 -07:00
Joe Perches 5e0cc8a231 staging: vt6655: Convert to kernel brace style
Move braces around to be more kernel like.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 11:16:16 -07:00
Joe Perches f2046f93db staging: vt6655: Remove commented out printks
These are just noise in the code so remove them.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 11:16:16 -07:00
Joe Perches 22c5291e70 staging:vt6655:dpc: Whitespace cleanups
Neatening only.
git diff -w shows no differences.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-18 17:21:35 -07:00
Justin P. Mattock 789d1aef17 staging: "vt6655" Fix typos in comments.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 13:59:12 -07:00
Marcos Paulo de Souza 27e3b90153 staging: vt6655: Remove all commented macros
These macros were reported by forgotten-macros tool
(https://github.com/marcosps/forgotten_macros).

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-09 12:56:31 -07:00
Andy Shevchenko 30d6a2b870 staging: vt6655: simplify MAC printing by using %pM
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 14:36:17 -07:00
Joe Perches 9fc86028fa 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>
2011-04-25 16:58:34 -07:00
Charles Clément 7b6a001313 Staging: vt6655: replace BOOL with in kernel bool
Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-02 18:17:57 -07:00
Charles Clément 5a5a2a6ad4 Staging: vt6655: replace FALSE with in kernel false
Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-02 18:17:38 -07:00
Charles Clément 1b12068a80 Staging: vt6655: replace TRUE with in kernel true
Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-02 18:17:12 -07:00
Charles Clément 388bf2e8fe Staging: vt6655: simplify broadcast and multicast ethernet address test
A broadcast address is also a multicast address so simplify test cases where
possible.

As suggested by Joe Perches.

Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-08 13:02:56 -07:00