From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
To: Andrew Morton <akpm@linux-foundation.org>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
Tejun Heo <tj@kernel.org>
Cc: Joe Perches <joe@perches.com>, linux-kernel@vger.kernel.org
Subject: [PATCH] lib/vsprintf.c: silence sparse warnings about decpair[] initialization
Date: Fri, 13 Mar 2015 09:58:36 +0100 [thread overview]
Message-ID: <1426237116-18457-1-git-send-email-linux@rasmusvillemoes.dk> (raw)
In-Reply-To: <1426028472-19614-1-git-send-email-linux@rasmusvillemoes.dk>
sparse is unhappy about the initialization of decpair[] and spews out
a ton of "incorrect type in initializer (different base types)". Shut
it up so useful warnings wouldn't drown in the noise.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
lib/vsprintf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 5edbf5b8d93f..e0bea9e5bbbf 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -148,7 +148,7 @@ int skip_atoi(const char **s)
*/
static const u16 decpair[100] = {
-#define _(x) cpu_to_le16(((x % 10) | ((x / 10) << 8)) + 0x3030)
+#define _(x) (__force u16) cpu_to_le16(((x % 10) | ((x / 10) << 8)) + 0x3030)
_( 0), _( 1), _( 2), _( 3), _( 4), _( 5), _( 6), _( 7), _( 8), _( 9),
_(10), _(11), _(12), _(13), _(14), _(15), _(16), _(17), _(18), _(19),
_(20), _(21), _(22), _(23), _(24), _(25), _(26), _(27), _(28), _(29),
--
2.1.3
next prev parent reply other threads:[~2015-03-13 8:59 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-20 23:51 [RFC] lib/vsprintf.c: Even faster decimal conversion Rasmus Villemoes
2015-03-05 15:22 ` Rasmus Villemoes
2015-03-05 16:03 ` Joe Perches
2015-03-05 16:10 ` Tejun Heo
2015-03-05 22:24 ` Rasmus Villemoes
2015-03-10 10:47 ` Rasmus Villemoes
2015-03-10 12:42 ` Tejun Heo
2015-03-10 12:57 ` Rasmus Villemoes
2015-03-10 23:01 ` [PATCH v1] " Rasmus Villemoes
2015-03-11 21:52 ` Andrew Morton
2015-03-19 21:41 ` Rasmus Villemoes
2015-03-12 18:49 ` Jeff Epler
2015-03-13 0:08 ` Jeff Epler
2015-03-13 0:30 ` Jeff Epler
2015-03-13 8:58 ` Rasmus Villemoes [this message]
2015-03-19 21:44 ` [PATCH] lib/vsprintf.c: improve put_dec_trunc8 slightly Rasmus Villemoes
2015-03-18 0:50 ` [RFC] lib/vsprintf.c: Even faster decimal conversion Denys Vlasenko
2015-03-18 0:52 ` Denys Vlasenko
2015-03-18 17:10 ` Rasmus Villemoes
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=1426237116-18457-1-git-send-email-linux@rasmusvillemoes.dk \
--to=linux@rasmusvillemoes.dk \
--cc=akpm@linux-foundation.org \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=tj@kernel.org \
/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®