From: Aurelien Jarno <aurelien@aurel32.net>
To: Michael Buesch <mb@bu3sch.de>
Cc: linux-wireless@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH][SSB] Fix a warning in PCI core driver
Date: Mon, 13 Aug 2007 02:18:49 +0200 [thread overview]
Message-ID: <20070813001849.GC4966@hall.aurel32.net> (raw)
In-Reply-To: <200708130202.28030.mb@bu3sch.de>
On Mon, Aug 13, 2007 at 02:02:27AM +0200, Michael Buesch wrote:
> On Monday 13 August 2007 01:50:58 Aurelien Jarno wrote:
> > The patch below fixes a warning spotted a few days ago by Andrew Morton
> > while releasing 2.6.23-rc2-mm1.
> >
> > Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> >
> > --- a/drivers/ssb/driver_pcicore.c
> > +++ b/drivers/ssb/driver_pcicore.c
> > @@ -278,7 +278,7 @@
> > static struct resource ssb_pcicore_mem_resource = {
> > .name = "SSB PCIcore external memory",
> > .start = SSB_PCI_DMA,
> > - .end = SSB_PCI_DMA + SSB_PCI_DMA_SZ - 1,
> > + .end = (u32)SSB_PCI_DMA + (u32)SSB_PCI_DMA_SZ - 1,
> > .flags = IORESOURCE_MEM,
> > };
> >
> >
>
> These casts were intentionally removed by me.
> I think they are bogus and I have no idea why this
> generates this strange compiler warning (I think it
> was some overflow warning?).
>
Yes it is overflow warning. The compiler thinks that those constant are
signed values and thus generate an overflow.
Another fix would be to postfix those constants by U.
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
next prev parent reply other threads:[~2007-08-13 0:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-12 23:50 [PATCH][SSB] Fix a warning in PCI core driver Aurelien Jarno
2007-08-13 0:02 ` Michael Buesch
2007-08-13 0:18 ` Aurelien Jarno [this message]
2007-08-13 2:21 ` Michael Buesch
2007-08-13 9:07 ` Aurelien Jarno
2007-08-13 12:18 ` Michael Buesch
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=20070813001849.GC4966@hall.aurel32.net \
--to=aurelien@aurel32.net \
--cc=akpm@linux-foundation.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mb@bu3sch.de \
/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;
as well as URLs for NNTP newsgroup(s).