From patchwork Tue Oct 30 22:07:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 149758 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp6037533ljp; Tue, 30 Oct 2018 15:07:35 -0700 (PDT) X-Google-Smtp-Source: AJdET5fu024GTpeAyIaeD8DtIG/WBRnEpjA0vBEL7XBBZCHybevVzOI4oZl445e7iBS/ZtZQ0jHz X-Received: by 2002:a63:c0f:: with SMTP id b15mr499543pgl.314.1540937255778; Tue, 30 Oct 2018 15:07:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540937255; cv=none; d=google.com; s=arc-20160816; b=H9gxhKJnWaM6gAmDTgAHSD6NhBcEPL+57RpyhirPurw59NiW8JbJjTVYT/EVtFqHS9 zjgx0FAk/FxUM3qefxiChKuBmoDtpU5TOCOt+D/yLN8G4eajpPwS2uty4+IWHImEuckh jP+yXsyc697Sh6eydEU7ZnFoTIFUKDAlJsdbZ47B9liJcOf9J1KcyaFqbAG6etXsEMbJ Y2n+vKMuJWSiRCmzwN+EP+QwdZSNhmx2YCMyRZQEKs4f6mIqhKmT/lkBLVecFT5klgbt +WxbNgmSOKb0PsLN7ehLsN0MgZqufnRmdplJ+VnCrwtGe0LVv0+kNRUNqlS3Xh6xyj5k Zd+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:subject:to:from :date; bh=z7eMDxUyHXXH1JqOoo5KRVaMmmon8SpNFlUsp2/DJyk=; b=QnygrDybn/D8Kvg4KlKEdQYHBSCzRsMn7GXwyCSGViqKCeC1w28DJRHmTt9wxABGH7 mNQWenwrnstiZUQDovn73zBtMveC5obWzGYBZJ1qVOir8CKnuANKnjOa7x2YcWRJlceA cLQ1Izv7ND40rtPV5YM4uMHIAGvH8Sp8jOis2hSq8UxRgun7wDStbWGh1XnxRhhZqkin mRYaUbj2qGQn9s0zZCh01vzvMMgWiKK9d0/vzNR5OlrgoeBmdLbJWAHFxK1GltAEzNF7 GdbrQDDr8mWK+HsVJSKNv+B0n5X57XgkxyYhnjvzyH5vaaZAB6N3sOGsiyUD1TI+9Psx dlcg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a17si1382696pgv.456.2018.10.30.15.07.35; Tue, 30 Oct 2018 15:07:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728417AbeJaHCs (ORCPT + 15 others); Wed, 31 Oct 2018 03:02:48 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:40576 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728388AbeJaHCs (ORCPT ); Wed, 31 Oct 2018 03:02:48 -0400 Received: from localhost.localdomain (c-71-198-47-131.hsd1.ca.comcast.net [71.198.47.131]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id BAED53EBA; Tue, 30 Oct 2018 22:07:33 +0000 (UTC) Date: Tue, 30 Oct 2018 15:07:32 -0700 From: akpm@linux-foundation.org To: akpm@linux-foundation.org, arnd@arndb.de, David.Laight@ACULAB.COM, gregkh@linuxfoundation.org, kieran.bingham+renesas@ideasonboard.com, mm-commits@vger.kernel.org, stable@vger.kernel.org, torvalds@linux-foundation.org, yamada.masahiro@socionext.com Subject: [patch 55/96] kbuild: fix kernel/bounds.c 'W=1' warning Message-ID: <20181030220732.UPsUOoECA%akpm@linux-foundation.org> User-Agent: s-nail v14.8.16 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann Subject: kbuild: fix kernel/bounds.c 'W=1' warning Building any configuration with 'make W=1' produces a warning: kernel/bounds.c:16:6: warning: 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. Link: http://lkml.kernel.org/r/20181005083313.2088252-1-arnd@arndb.de Signed-off-by: Arnd Bergmann Reported-by: Kieran Bingham Reviewed-by: Kieran Bingham Cc: David Laight Cc: Masahiro Yamada Cc: Greg Kroah-Hartman Cc: Signed-off-by: Andrew Morton --- kernel/bounds.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/kernel/bounds.c~kbuild-fix-kernel-boundsc-w=1-warning +++ a/kernel/bounds.c @@ -13,7 +13,7 @@ #include #include -void foo(void) +int main(void) { /* The enum constants to put into include/generated/bounds.h */ DEFINE(NR_PAGEFLAGS, __NR_PAGEFLAGS); @@ -23,4 +23,6 @@ void foo(void) #endif DEFINE(SPINLOCK_SIZE, sizeof(spinlock_t)); /* End of constants */ + + return 0; }