Re: linux-next: Tree for Jun 20 (hweight return type)

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

 



On Wed, 20 Jun 2012 18:10:09 -0700 Randy Dunlap <rdunlap@xxxxxxxxxxxx> wrote:
>
> Someone changes the return type of __const_hweight8() to
> (unsigned long).  That causes printk format warnings when
> hweight8/16() etc. is passed a constant:

That would be "include/linux/bitops.h: fix warning" from the akpm tree
(adding cc's).

> 
> drivers/input/joystick/analog.c:412:4: warning: format '%d' expects type 'int', but argument 4 has type 'long unsigned int'
> drivers/input/joystick/analog.c:412:4: warning: format '%d' expects type 'int', but argument 5 has type 'long unsigned int'
> drivers/input/joystick/analog.c:416:5: warning: format '%d' expects type 'int', but argument 5 has type 'long unsigned int'
> 
> 
> Note that in
> 
> #define hweight8(w)  (__builtin_constant_p(w) ? __const_hweight8(w)  : __arch_hweight8(w))
> 
> __arch_hweight*() still returns unsigned int while __const_hweight*()
> returns unsigned long.  This can't be good, can it?

-- 
Cheers,
Stephen Rothwell                    sfr@xxxxxxxxxxxxxxxx

Attachment: pgpkIrpPQ6fsF.pgp
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux