lkml.org 
[lkml]   [2012]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: linux-next: Tree for Jun 20 (hweight return type)
On 06/20/2012 12:35 AM, Stephen Rothwell wrote:

> Hi all,
>
> Changes since 20120619:


Someone changes the return type of __const_hweight8() to
(unsigned long). That causes printk format warnings when
hweight8/16() etc. is passed a constant:

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?




--
~Randy


\
 
 \ /
  Last update: 2012-06-21 03:41    [W:0.087 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site