From: Paul Bolle <pebolle@tiscali.nl>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Adaptec OEM Raid Solutions <aacraid@adaptec.com>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
akpm@linux-foundation.org
Subject: Re: [PATCH] [SCSI] aacraid: silence two GCC warnings
Date: Wed, 20 Feb 2013 12:01:17 +0100 [thread overview]
Message-ID: <1361358077.1341.14.camel@x61.thuisdomein> (raw)
In-Reply-To: <1361356823.2581.43.camel@dabdike.int.hansenpartnership.com>
On Wed, 2013-02-20 at 10:40 +0000, James Bottomley wrote:
> On Sat, 2013-02-09 at 21:09 +0100, Paul Bolle wrote:
> > --- a/drivers/scsi/aacraid/src.c
> > +++ b/drivers/scsi/aacraid/src.c
> > @@ -407,7 +407,7 @@ static int aac_src_deliver_message(struct fib *fib)
> > fib->hw_fib_va->header.StructType = FIB_MAGIC2;
> > fib->hw_fib_va->header.SenderFibAddress = (u32)address;
> > fib->hw_fib_va->header.u.TimeStamp = 0;
> > - BUG_ON((u32)(address >> 32) != 0L);
> > + BUG_ON(((u64)address >> 32) != 0UL);
>
> Actually, this isn't the right way to do this. The correct way would be
> address >> 16 >> 16, but no-one is expected to remember this, so we have
> it macroised in kernel.h as upper_32_bits().
>
> So this should become
>
> BUG_ON(upper_32_bits(address) != 0L);
Thanks. I hadn't yet stumbled onto that macro.
> and a similar change for the below.
I hope to send an updated patch shortly.
Paul Bolle
next prev parent reply other threads:[~2013-02-20 11:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-09 20:09 Paul Bolle
2013-02-20 10:40 ` James Bottomley
2013-02-20 11:01 ` Paul Bolle [this message]
2013-02-21 11:39 ` [PATCH v2] [SCSI] aacraid: suppress " Paul Bolle
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=1361358077.1341.14.camel@x61.thuisdomein \
--to=pebolle@tiscali.nl \
--cc=James.Bottomley@HansenPartnership.com \
--cc=aacraid@adaptec.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
/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
all inboxes | Powered by JetHome®