From: Andrew Morton <akpm@linux-foundation.org>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: sergey.senozhatsky@mail.by, linux-scsi@vger.kernel.org,
Kai.Makisara@kolumbus.fi
Subject: Re: [PATCH]: fixing gcc 4.4 compiler warning: suggest parentheses around operand of ‘!’
Date: Thu, 30 Apr 2009 14:46:56 -0700 [thread overview]
Message-ID: <20090430144656.714fe853.akpm@linux-foundation.org> (raw)
In-Reply-To: <1241127084.3320.14.camel@mulgrave.int.hansenpartnership.com>
On Thu, 30 Apr 2009 21:31:24 +0000
James Bottomley <James.Bottomley@HansenPartnership.com> wrote:
> On Thu, 2009-04-30 at 09:04 +0300, Sergey Senozhatsky wrote:
> > 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;
>
> This just doesn't look right. As I said to the warning reporter, I
> think STp->use_pf |= PF_TESTED; is the correct fix, but I need Kai to
> check this.
yeah, good point. The code looks very confused.
--
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
next prev parent reply other threads:[~2009-04-30 21:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-30 6:04 [PATCH]: fixing gcc 4.4 compiler warning: suggest parentheses around operand of ‘!’ Sergey Senozhatsky
2009-04-30 21:31 ` James Bottomley
2009-04-30 21:46 ` Andrew Morton [this message]
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
2009-05-02 5:49 ` [PATCH] SCSI tape: fix gcc 4.4 warning Kai Makisara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090430144656.714fe853.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=Kai.Makisara@kolumbus.fi \
--cc=linux-scsi@vger.kernel.org \
--cc=sergey.senozhatsky@mail.by \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox