mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Neil Brown <neilb@suse.de>
To: Randy Dunlap <randy.dunlap@oracle.com>
Cc: lkml <linux-kernel@vger.kernel.org>, akpm <akpm@osdl.org>
Subject: Re: [PATCH] raid: fix printk format warnings
Date: Sun, 22 Oct 2006 14:06:21 +1000	[thread overview]
Message-ID: <17722.60989.448470.587430@cse.unsw.edu.au> (raw)
In-Reply-To: message from Randy Dunlap on Saturday October 21

On Saturday October 21, randy.dunlap@oracle.com wrote:
> From: Randy Dunlap <randy.dunlap@oracle.com>
> 
> Fix printk format warnings, seen on powerpc64:
> drivers/md/raid1.c:1479: warning: long long unsigned int format, long unsigned int arg (arg 4)
> drivers/md/raid10.c:1475: warning: long long unsigned int format, long unsigned int arg (arg 4)
> 
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
> ---
> 
>  drivers/md/raid1.c  |    4 ++--
>  drivers/md/raid10.c |    4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff -Naurp linux-2619-rc2g4/drivers/md/raid1.c~raid_printk linux-2619-rc2g4/drivers/md/raid1.c
> --- linux-2619-rc2g4/drivers/md/raid1.c~raid_printk	2006-10-21 11:16:30.066109000 -0700
> +++ linux-2619-rc2g4/drivers/md/raid1.c	2006-10-21 11:20:57.288004000 -0700
> @@ -1474,8 +1474,8 @@ static void fix_read_error(conf_t *conf,
>  					       "raid1:%s: read error corrected "
>  					       "(%d sectors at %llu on %s)\n",
>  					       mdname(mddev), s,
> -					       (unsigned long long)sect +
> -					           rdev->data_offset,
> +					       (unsigned long long)(sect +
> +					           rdev->data_offset),
>  					       bdevname(rdev->bdev,
> b));

So you're saying that if you add an 'unsigned long long int' to an
'unsigned long int', the result is an 'unsigned long int'???
That is not what I would have expected.
I'm happy with the patch, but I'm very surprised that it is needed.
Is this behaviour consistent across various versions of gcc (if it is
convenient to check)??

Thanks,
NeilBrown

  reply	other threads:[~2006-10-22  4:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-21 18:34 Randy Dunlap
2006-10-22  4:06 ` Neil Brown [this message]
2006-10-22  5:14   ` Randy.Dunlap
2006-10-23  1:24     ` Neil Brown

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=17722.60989.448470.587430@cse.unsw.edu.au \
    --to=neilb@suse.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=randy.dunlap@oracle.com \
    /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®