From: Andrew Morton <akpm@osdl.org>
To: Greg KH <greg@kroah.com>
Cc: smiler@lanil.mine.nu, linux-kernel@vger.kernel.org
Subject: Re: [2.7.75] Misc compiler warnings
Date: Sat, 12 Jul 2003 21:50:58 -0700 [thread overview]
Message-ID: <20030712215058.16f76ebc.akpm@osdl.org> (raw)
In-Reply-To: <20030713040801.GA2695@kroah.com>
Greg KH <greg@kroah.com> wrote:
>
> On Sun, Jul 13, 2003 at 02:23:29AM +0200, Christian Axelsson wrote:
> > On Sun, 2003-07-13 at 01:52, Christian Axelsson wrote:
> > > Here are some compiler warnings:
> > >
> > > CC drivers/i2c/i2c-dev.o
> > > drivers/i2c/i2c-dev.c: In function `show_dev':
> > > drivers/i2c/i2c-dev.c:121: warning: unsigned int format, different type
> > > arg (arg 3)
> > >
> > > CC drivers/usb/core/file.o
> > > drivers/usb/core/file.c: In function `show_dev':
> > > drivers/usb/core/file.c:96: warning: unsigned int format, different type
> > > arg (arg 3)
> > >
> > > AS arch/i386/boot/setup.o
> > > arch/i386/boot/setup.S: Assembler messages:
> > > arch/i386/boot/setup.S:165: Warning: value 0x37ffffff truncated to
> > > 0x37ffffff
> >
> > Ehm sorry, I should say that this is 2.5.75-mm1
> >
> > On 2.5.75-vanilla only the AS message occour.
>
> That is due to the size of dev_t being bigger in the -mm tree. When
> that moves to the main kernel tree, I'll fix up the usb and i2c
> warnings.
>
No, these need to be fixed anyway. On ppc64 (at least), dev_t is `unsigned
long'.
So on that platform the code you have in there right now will always
generate zeroes or it will oops, if there are %s's further along.
I'm not sure what's the best fix really. Maybe casting to `unsigned long
long' and handling it with %llx.
I've fixed lots of these things but have a vague feeling I've been using
`unsigned long'. That's probably good enough most of the time.
Better would be just to not play around with dev_t's in-kernel in this
manner at all. Why are we doing it?
next prev parent reply other threads:[~2003-07-13 4:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-12 23:52 Christian Axelsson
2003-07-13 0:23 ` Christian Axelsson
2003-07-13 4:08 ` Greg KH
2003-07-13 4:50 ` Andrew Morton [this message]
2003-07-13 5:29 ` Greg KH
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=20030712215058.16f76ebc.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=smiler@lanil.mine.nu \
/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®