From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Randy Dunlap <rdunlap@xenotime.net>
Cc: linux-next@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Namjae Jeon <linkinjeon@gmail.com>
Subject: Re: linux-next: Tree for Jun 20 (hweight return type)
Date: Thu, 21 Jun 2012 11:45:46 +1000 [thread overview]
Message-ID: <20120621114546.1e5df51bd231ee481d63705c@canb.auug.org.au> (raw)
In-Reply-To: <4FE27471.8050505@xenotime.net>
[-- Attachment #1: Type: text/plain, Size: 1052 bytes --]
On Wed, 20 Jun 2012 18:10:09 -0700 Randy Dunlap <rdunlap@xenotime.net> 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@canb.auug.org.au
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-06-21 1:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-20 7:35 linux-next: Tree for Jun 20 Stephen Rothwell
2012-06-21 1:10 ` linux-next: Tree for Jun 20 (hweight return type) Randy Dunlap
2012-06-21 1:45 ` Stephen Rothwell [this message]
2012-06-21 3:32 ` Namjae Jeon
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=20120621114546.1e5df51bd231ee481d63705c@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=akpm@linux-foundation.org \
--cc=linkinjeon@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=rdunlap@xenotime.net \
/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®