diff options
author | Joe Perches <joe@perches.com> | 2013-09-01 23:32:33 -0400 |
---|---|---|
committer | Robert Love <robert.w.love@intel.com> | 2013-10-14 11:25:40 -0400 |
commit | 6942df7f775107b504f10de42c81971f514d718d (patch) | |
tree | 9abb29ea3ffe7f72d1d56b487fc5a31acc5af6eb /drivers/scsi/bnx2fc | |
parent | 55d0ac5d2839fe270cea02fad44eed13750a0efd (diff) |
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/bnx2fc')
-rw-r--r-- | drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c index 27f2cc4b97a5..23f6eea3fa7a 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c | |||
@@ -542,8 +542,7 @@ static void bnx2fc_recv_frame(struct sk_buff *skb) | |||
542 | vn_port = fc_vport_id_lookup(lport, ntoh24(fh->fh_d_id)); | 542 | vn_port = fc_vport_id_lookup(lport, ntoh24(fh->fh_d_id)); |
543 | if (vn_port) { | 543 | if (vn_port) { |
544 | port = lport_priv(vn_port); | 544 | port = lport_priv(vn_port); |
545 | if (compare_ether_addr(port->data_src_addr, dest_mac) | 545 | if (!ether_addr_equal(port->data_src_addr, dest_mac)) { |
546 | != 0) { | ||
547 | BNX2FC_HBA_DBG(lport, "fpma mismatch\n"); | 546 | BNX2FC_HBA_DBG(lport, "fpma mismatch\n"); |
548 | put_cpu(); | 547 | put_cpu(); |
549 | kfree_skb(skb); | 548 | kfree_skb(skb); |