lkml.org 
[lkml]   [2012]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: linux-next: manual merge of the watchdog tree with the mfd tree
Hi guys,

On Tue, 22 May 2012 15:37:04 -0700 Guenter Roeck <guenter@roeck-us.net> wrote:
>
> >I don't think we have a clear standard yet, but I'm fine with either
> >one of them.
>
> Me too, though %04lx and typecast to long should really be sufficient.
>
> I'd guess the change was made because resource_size_t is sometimes a long
> and sometimes a long long, depending on the platform. I hit that
> problem a couple of times myself.

Exactly. Since resource_size_t can be either 32 bit or 64 bit on 32 bit
platforms, you must print it as %llx and cast it to u64 always to
prevent these warnings. If you cast it to (unsigned) long you could
possibly truncate the value.

--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2012-05-23 01:41    [W:0.052 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site