Skip to contentSkip to conversation

scsi: libfc add missing braces to in WARN_ON

PATCH In review Harvey Harrison 2 participants 3 messages Feb 19, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: libfc add missing braces to in WARN_ON

Noticed by sparse:
drivers/scsi/libfc/fc_exch.c:286:3: warning: dubious: !x & y

---
 drivers/scsi/libfc/fc_exch.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/scsi/libfc/fc_exch.c +1 -1
index 66db08a..e3ee657 100644
@@ -283,7 +283,7 @@ static void fc_exch_release(struct fc_exch *ep)
 			ep->destructor(&ep->seq, ep->arg);
 		if (ep->lp->tt.exch_put)
 			ep->lp->tt.exch_put(ep->lp, mp, ep->xid);
-		WARN_ON(!ep->esb_stat & ESB_ST_COMPLETE);
+		WARN_ON(!(ep->esb_stat & ESB_ST_COMPLETE));
 		mempool_free(ep, mp->ep_pool);
 	}
 }
Signature · 1 line
1.6.2.rc1.175.g96b8a
#2 lore raw
Quoted 10 lines · James Bottomley
Quoted 2 lines · Harvey Harrison

Noticed by sparse:
drivers/scsi/libfc/fc_exch.c:286:3: warning: dubious: !x & y

Thanks for finding this, but the patch is already queued here:

http://marc.info/?l=linux-scsi&m=123378225922727

James

No worries, just did a sparse run on linux-next (20090217) and saw this.

Harvey