Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753205AbbDGVUF (ORCPT ); Tue, 7 Apr 2015 17:20:05 -0400 Received: from mail-bn1bn0107.outbound.protection.outlook.com ([157.56.110.107]:54018 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752911AbbDGVUD (ORCPT ); Tue, 7 Apr 2015 17:20:03 -0400 Message-ID: <1428441592.22867.466.camel@freescale.com> Subject: Re: powerpc32: fix warning from include/linux/mm.h From: Scott Wood To: leroy christophe CC: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , , Date: Tue, 7 Apr 2015 16:19:52 -0500 In-Reply-To: <5523905E.6050007@c-s.fr> References: <20141205112020.640FA1A5D4F@localhost.localdomain> <20150320235213.GA1233@home.buserror.net> <5523905E.6050007@c-s.fr> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Originating-IP: [2601:2:5800:3f7:12bf:48ff:fe84:c9a0] X-ClientProxiedBy: BY2PR06CA023.namprd06.prod.outlook.com (10.141.250.141) To BN3PR03MB1479.namprd03.prod.outlook.com (25.163.35.142) Authentication-Results: c-s.fr; dkim=none (message not signed) header.d=none; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR03MB1479; X-Forefront-Antispam-Report: BMV:1;SFV:NSPM;SFS:(10019020)(6009001)(51704005)(479174004)(24454002)(377424004)(47776003)(110136001)(5820100001)(92566002)(46102003)(33646002)(62966003)(36756003)(40100003)(77156002)(122386002)(103116003)(19580405001)(42186005)(50466002)(2950100001)(86362001)(50226001)(76176999)(50986999)(23676002)(87976001)(3826002);DIR:OUT;SFP:1102;SCL:1;SRVR:BN3PR03MB1479;H:[IPv6:2601:2:5800:3f7:12bf:48ff:fe84:c9a0];FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5002010)(5005006);SRVR:BN3PR03MB1479;BCL:0;PCL:0;RULEID:;SRVR:BN3PR03MB1479; X-Forefront-PRVS: 0539EEBD11 X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Apr 2015 21:19:59.2302 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR03MB1479 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1900 Lines: 42 On Tue, 2015-04-07 at 10:07 +0200, leroy christophe wrote: > Le 21/03/2015 00:52, Scott Wood a écrit : > > On Fri, Dec 05, 2014 at 12:20:20PM +0100, LEROY Christophe wrote: > >> include/linux/mm.h: In function 'is_vmalloc_addr': > >> include/linux/mm.h:367:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] > >> return addr >= VMALLOC_START && addr < VMALLOC_END; > >> ^ > >> > >> Signed-off-by: Christophe Leroy > >> --- > >> arch/powerpc/include/asm/pgtable-ppc32.h | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > > That warning doesn't appear to be enabled. What config are you seeing > > this with? > I'm used to adding EXTRA_CFLAGS=-Wextra when checking my own drivers, > as it helps finding additional bugs. It also produces a lot of noise, which is why Linux doesn't enable it. E.g. it enables useless "unused parameter" warnings all over the place. > When doing that, the only warnings I get outside of my own code are this > one, and the other one in my proposed patch identified "powerpc32: fix > warning from include/asm-generic/termios-base.h" > > I though it would be worth fixing those two warnings in order to get a > perfectly clean code. In general I don't think we should clutter up the code with suppression for warnings we don't enable, but in this case we do end up with a value that would be negative if considered as signed. Instead of changing VMALLOC_OFFSET, though, I'd address it where the problem is actually introduced -- which is casting high_memory to (long) rather than (unsigned long) or (uintptr_t). -Scott -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/