From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5E6A6C00449 for ; Fri, 5 Oct 2018 08:52:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B9ADD208E7 for ; Fri, 5 Oct 2018 08:52:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B9ADD208E7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ACULAB.COM Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728727AbeJEPtu convert rfc822-to-8bit (ORCPT ); Fri, 5 Oct 2018 11:49:50 -0400 Received: from eu-smtp-delivery-151.mimecast.com ([207.82.80.151]:26061 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728433AbeJEPtu (ORCPT ); Fri, 5 Oct 2018 11:49:50 -0400 Received: from AcuMS.aculab.com (156.67.243.126 [156.67.243.126]) (Using TLS) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-116-ZPlNGJbGODec3sk-zLYafg-1; Fri, 05 Oct 2018 09:52:02 +0100 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b::d117) by AcuMS.aculab.com (fd9f:af1c:a25b::d117) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Fri, 5 Oct 2018 09:52:02 +0100 Received: from AcuMS.Aculab.com ([fe80::43c:695e:880f:8750]) by AcuMS.aculab.com ([fe80::43c:695e:880f:8750%12]) with mapi id 15.00.1347.000; Fri, 5 Oct 2018 09:52:02 +0100 From: David Laight To: 'Arnd Bergmann' , Andrew Morton CC: "linux-renesas-soc@vger.kernel.org" , Kieran Bingham , "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-kbuild@vger.kernel.org" , "yamada.masahiro@socionext.com" Subject: RE: [PATCH] kbuild: fix kernel/bounds.c 'W=1' warning Thread-Topic: [PATCH] kbuild: fix kernel/bounds.c 'W=1' warning Thread-Index: AQHUXIYZ0gwSLziKwUSuxurlLKTixKUQV4pg Date: Fri, 5 Oct 2018 08:52:02 +0000 Message-ID: <08b190b9dabd4625ae3d636b88b43ccb@AcuMS.aculab.com> References: <20180921142234.16882-1-kieran.bingham+renesas@ideasonboard.com> <20181005083313.2088252-1-arnd@arndb.de> In-Reply-To: <20181005083313.2088252-1-arnd@arndb.de> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-MC-Unique: ZPlNGJbGODec3sk-zLYafg-1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann > Sent: 05 October 2018 09:33 > > Building any configuration with 'make W=1' produces a warning: > > kernel/bounds.c:16:6: warnign: no previous prototype for 'foo' [-Wmissing-prototypes] > > When also passing -Werror, this prevents us from building any > other files. Nobody ever calls the function, but we can't make > it 'static' either since we want the compiler output. > > Calling it 'main' instead however avoids the warning, because gcc > does not insist on having a declaration for main. Ugg. main() might be special in other ways too. It wouldn't surprise me if some linkers don't do special stuff for it. What is wrong with just putting and extra "void foo(void);" before the function? David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales) From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eu-smtp-delivery-151.mimecast.com ([207.82.80.151]:53867 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728281AbeJEPtu (ORCPT ); Fri, 5 Oct 2018 11:49:50 -0400 From: David Laight To: 'Arnd Bergmann' , Andrew Morton CC: "linux-renesas-soc@vger.kernel.org" , Kieran Bingham , "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-kbuild@vger.kernel.org" , "yamada.masahiro@socionext.com" Subject: RE: [PATCH] kbuild: fix kernel/bounds.c 'W=1' warning Date: Fri, 5 Oct 2018 08:52:02 +0000 Message-ID: <08b190b9dabd4625ae3d636b88b43ccb@AcuMS.aculab.com> References: <20180921142234.16882-1-kieran.bingham+renesas@ideasonboard.com> <20181005083313.2088252-1-arnd@arndb.de> In-Reply-To: <20181005083313.2088252-1-arnd@arndb.de> Content-Language: en-US MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: stable-owner@vger.kernel.org List-ID: From: Arnd Bergmann > Sent: 05 October 2018 09:33 > > Building any configuration with 'make W=1' produces a warning: > > kernel/bounds.c:16:6: warnign: no previous prototype for 'foo' [-Wmissing-prototypes] > > When also passing -Werror, this prevents us from building any > other files. Nobody ever calls the function, but we can't make > it 'static' either since we want the compiler output. > > Calling it 'main' instead however avoids the warning, because gcc > does not insist on having a declaration for main. Ugg. main() might be special in other ways too. It wouldn't surprise me if some linkers don't do special stuff for it. What is wrong with just putting and extra "void foo(void);" before the function? David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)