Staging: Convert uses of compare_ether_addr to ether_addr_equal
authorJoe Perches <joe@perches.com>
Sun, 1 Sep 2013 19:15:47 +0000 (12:15 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Sep 2013 14:47:44 +0000 (07:47 -0700)
commit8329419a29d15abebc3aefb57f4c6bfdbded7d89
treed8409cc4c33cbeb543250e8e3373de6894a89618
parenteed88971337309d50396578ae268cfa79feb3ca0
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>
17 files changed:
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
drivers/staging/rtl8192e/rtllib_rx.c
drivers/staging/slicoss/slicoss.c
drivers/staging/vt6655/bssdb.c
drivers/staging/vt6655/dpc.c
drivers/staging/vt6655/iwctl.c
drivers/staging/vt6655/key.c
drivers/staging/vt6655/wctl.c
drivers/staging/vt6655/wmgr.c
drivers/staging/vt6655/wpactl.c
drivers/staging/vt6656/bssdb.c
drivers/staging/vt6656/dpc.c
drivers/staging/vt6656/iwctl.c
drivers/staging/vt6656/key.c
drivers/staging/vt6656/wctl.c
drivers/staging/vt6656/wmgr.c
drivers/staging/vt6656/wpactl.c