summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/toshiba
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-05-09 17:17:46 +0000
committerDavid S. Miller <davem@davemloft.net>2012-05-10 23:33:01 -0400
commit2e42e4747ea72943c21551d8a206b51a9893b1e0 (patch)
treea92473c485911b51e1d960c9c8fa34dfc9be0a46 /drivers/net/ethernet/toshiba
parent39f1d94d300a58eb3e9b851d077cada4e2fa9d46 (diff)
downloadop-kernel-dev-2e42e4747ea72943c21551d8a206b51a9893b1e0.zip
op-kernel-dev-2e42e4747ea72943c21551d8a206b51a9893b1e0.tar.gz
drivers/net: 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. 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>
Diffstat (limited to 'drivers/net/ethernet/toshiba')
-rw-r--r--drivers/net/ethernet/toshiba/ps3_gelic_wireless.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/toshiba/ps3_gelic_wireless.c b/drivers/net/ethernet/toshiba/ps3_gelic_wireless.c
index 5c14f82..961c832 100644
--- a/drivers/net/ethernet/toshiba/ps3_gelic_wireless.c
+++ b/drivers/net/ethernet/toshiba/ps3_gelic_wireless.c
@@ -1590,8 +1590,8 @@ static void gelic_wl_scan_complete_event(struct gelic_wl_info *wl)
found = 0;
oldest = NULL;
list_for_each_entry(target, &wl->network_list, list) {
- if (!compare_ether_addr(&target->hwinfo->bssid[2],
- &scan_info->bssid[2])) {
+ if (ether_addr_equal(&target->hwinfo->bssid[2],
+ &scan_info->bssid[2])) {
found = 1;
pr_debug("%s: same BBS found scanned list\n",
__func__);
@@ -1691,8 +1691,8 @@ struct gelic_wl_scan_info *gelic_wl_find_best_bss(struct gelic_wl_info *wl)
/* If bss specified, check it only */
if (test_bit(GELIC_WL_STAT_BSSID_SET, &wl->stat)) {
- if (!compare_ether_addr(&scan_info->hwinfo->bssid[2],
- wl->bssid)) {
+ if (ether_addr_equal(&scan_info->hwinfo->bssid[2],
+ wl->bssid)) {
best_bss = scan_info;
pr_debug("%s: bssid matched\n", __func__);
break;
OpenPOWER on IntegriCloud