All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH]: fixing gcc 4.4 compiler warning: suggest parentheses around operand of ‘!’
@ 2009-04-30  6:06 Sergey Senozhatsky
  2009-05-01 16:15 ` David Miller
  0 siblings, 1 reply; 10+ messages in thread
From: Sergey Senozhatsky @ 2009-04-30  6:06 UTC (permalink / raw)
  To: Andrew Morton; +Cc: netdev

Trivial: fixing gcc 4.4 compiler warning:
drivers/net/cxgb3/t3_hw.c: In function ‘t3_prep_adapter’:
drivers/net/cxgb3/t3_hw.c:3782: warning: suggest parentheses around operand of ‘!’ or change ‘|’ to ‘||’ or ‘!’ to ‘~’

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@mail.by>

---

diff --git a/drivers/net/cxgb3/t3_hw.c b/drivers/net/cxgb3/t3_hw.c
index e1bd690..4f68aeb 100644
--- a/drivers/net/cxgb3/t3_hw.c
+++ b/drivers/net/cxgb3/t3_hw.c
@@ -3779,7 +3779,7 @@ int t3_prep_adapter(struct adapter *adapter, const struct adapter_info *ai,
 
 	adapter->params.info = ai;
 	adapter->params.nports = ai->nports0 + ai->nports1;
-	adapter->params.chan_map = !!ai->nports0 | (!!ai->nports1 << 1);
+	adapter->params.chan_map = (!!ai->nports0) | (!!ai->nports1 << 1);
 	adapter->params.rev = t3_read_reg(adapter, A_PL_REV);
 	/*
 	 * We used to only run the "adapter check task" once a second if


^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [PATCH]: fixing gcc 4.4 compiler warning: suggest parentheses around operand of ‘!’
@ 2009-04-30  6:04 Sergey Senozhatsky
  2009-04-30 21:31 ` James Bottomley
  0 siblings, 1 reply; 10+ messages in thread
From: Sergey Senozhatsky @ 2009-04-30  6:04 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-scsi

Trivial: fixing gcc 4.4 compiler warning:
drivers/scsi/st.c: In function ‘st_int_ioctl’:
drivers/scsi/st.c:2967: warning: suggest parentheses around operand of ‘!’ or change ‘|’ to ‘||’ or ‘!’ to ‘~’

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@mail.by>

---

diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index eb24efe..2bde8a5 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -2964,7 +2964,7 @@ static int st_int_ioctl(struct scsi_tape *STp, unsigned int cmd_in, unsigned lon
 			    !(STp->use_pf & PF_TESTED)) {
 				/* Try the other possible state of Page Format if not
 				   already tried */
-				STp->use_pf = !STp->use_pf | PF_TESTED;
+				STp->use_pf = (!STp->use_pf) | PF_TESTED;
 				st_release_request(SRpnt);
 				SRpnt = NULL;
 				return st_int_ioctl(STp, cmd_in, arg);

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-05-01 16:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-30  6:06 [PATCH]: fixing gcc 4.4 compiler warning: suggest parentheses around operand of ‘!’ Sergey Senozhatsky
2009-05-01 16:15 ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2009-04-30  6:04 Sergey Senozhatsky
2009-04-30 21:31 ` James Bottomley
2009-04-30 21:46   ` Andrew Morton
2009-04-30 21:59   ` Sergey Senozhatsky
2009-04-30 22:08     ` James Bottomley
2009-04-30 22:26       ` [PATCH]: fixing gcc 4.4 compiler warning: suggest parentheses around operand of ???!??? Al Viro
2009-04-30 23:09         ` Sergey Senozhatsky
2009-05-01  5:09         ` Kai Makisara

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.