Re: [PATCH] raid: fix printk format warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday October 21, [email protected] wrote:
> From: Randy Dunlap <[email protected]>
> 
> 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 <[email protected]>
> ---
> 
>  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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux