summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/fcoe/fcoe_sysfs.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-09-02 05:32:33 +0200
committerRobert Love <robert.w.love@intel.com>2013-10-14 17:25:40 +0200
commit6942df7f775107b504f10de42c81971f514d718d (patch)
tree9abb29ea3ffe7f72d1d56b487fc5a31acc5af6eb /drivers/scsi/fcoe/fcoe_sysfs.c
parentfcoe: Fix missing mutex_unlock in fcoe_sysfs_fcf_add error path (diff)
downloadlinux-6942df7f775107b504f10de42c81971f514d718d.tar.xz
linux-6942df7f775107b504f10de42c81971f514d718d.zip
scsi: 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. 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: Robert Love <robert.w.love@intel.com>
Diffstat (limited to 'drivers/scsi/fcoe/fcoe_sysfs.c')
-rw-r--r--drivers/scsi/fcoe/fcoe_sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/fcoe/fcoe_sysfs.c b/drivers/scsi/fcoe/fcoe_sysfs.c
index 922c9deeb243..d0d9a2d6120f 100644
--- a/drivers/scsi/fcoe/fcoe_sysfs.c
+++ b/drivers/scsi/fcoe/fcoe_sysfs.c
@@ -653,7 +653,7 @@ static int fcoe_fcf_device_match(struct fcoe_fcf_device *new,
if (new->switch_name == old->switch_name &&
new->fabric_name == old->fabric_name &&
new->fc_map == old->fc_map &&
- compare_ether_addr(new->mac, old->mac) == 0)
+ ether_addr_equal(new->mac, old->mac))
return 1;
return 0;
}