From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753285AbbCMI7U (ORCPT ); Fri, 13 Mar 2015 04:59:20 -0400 Received: from mail-la0-f52.google.com ([209.85.215.52]:34900 "EHLO mail-la0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751630AbbCMI7O (ORCPT ); Fri, 13 Mar 2015 04:59:14 -0400 From: Rasmus Villemoes To: Andrew Morton , Rasmus Villemoes , "Peter Zijlstra (Intel)" , Tejun Heo Cc: Joe Perches , 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 Message-Id: <1426237116-18457-1-git-send-email-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.1.3 In-Reply-To: <1426028472-19614-1-git-send-email-linux@rasmusvillemoes.dk> References: <1426028472-19614-1-git-send-email-linux@rasmusvillemoes.dk> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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