* [patch] [SCSI] fcoe: precedence bug in fcoe_filter_frames()
@ 2011-02-16 11:10 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2011-02-16 11:10 UTC (permalink / raw)
To: linux-scsi; +Cc: Robert Love, Vasu Dev, James Bottomley
Negate has higher precedence than bitwise AND. FCPHF_CRC_UNCHECKED is
0x1 so the original code is equivalent to: if (!fr_flags(fp)) { ...
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index 495456f..a2875d9 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -1546,7 +1546,7 @@ static inline int fcoe_filter_frames(struct fc_lport *lport,
return -EINVAL;
}
- if (!fr_flags(fp) & FCPHF_CRC_UNCHECKED ||
+ if (!(fr_flags(fp) & FCPHF_CRC_UNCHECKED) ||
le32_to_cpu(fr_crc(fp)) == ~crc32(~0, skb->data, skb->len)) {
fr_flags(fp) &= ~FCPHF_CRC_UNCHECKED;
return 0;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-02-16 11:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-16 11:10 [patch] [SCSI] fcoe: precedence bug in fcoe_filter_frames() Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox