]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
wireless: Convert compare_ether_addr to ether_addr_equal
authorJoe Perches <joe@perches.com>
Tue, 8 May 2012 18:56:55 +0000 (18:56 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 May 2012 00:49:19 +0000 (20:49 -0400)
commitac422d3cc25351819ec80b7e2852fd2c600c317c
treea6ca456ad41256bf2cee71a189c1c05027f16532
parent8561cf99785faf73cccb9f417170d8b5844bf496
wireless: Convert compare_ether_addr to ether_addr_equal

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

I removed a conversion from scan.c/cmp_bss_core
that appears to be a sorting function.

Done via cocci script:

$ 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: David S. Miller <davem@davemloft.net>
net/wireless/ibss.c
net/wireless/mlme.c
net/wireless/scan.c
net/wireless/util.c
net/wireless/wext-sme.c
net/wireless/wext-spy.c