Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3430968imu; Sun, 11 Nov 2018 14:57:42 -0800 (PST) X-Google-Smtp-Source: AJdET5fwpacpjFJOvyHKtSyCMOYL5ahbhH8CT9wuGyEeuzJjRuhVFDwVUMrjoax/51+iGMFMavH0 X-Received: by 2002:aa7:87d0:: with SMTP id i16-v6mr17721550pfo.20.1541977061998; Sun, 11 Nov 2018 14:57:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541977061; cv=none; d=google.com; s=arc-20160816; b=PXTm2zRECoDKFSgnbxvxye2nR3eH0MEVfG+dYL7+Aa0dObAp2W6GlgQDiTjKTqPFmW 7lIQT3L7qBsQoIMQz3LRKxKW5v2RNpvHCY9U6s2Dnyfud7a2NJ2BH+IS4FUAfCHgr9lg d3TPLzelbC7lk/f+H1q58M9zfxSexL99xvMZxpFKURdosJ3UdCok8om+DMyIRecvaMO4 jx+17X3PrKXUavZOgjbEXe91kMy92UJ8lPLC1eDdH8cmKU9ARxK3wEfCjLNY2MG01Fdc 6x/LhhFQ0oTeCoJGnbwHLt1hMf19LJ7mlL8qGq0SO+ocivWJ0kWGK6HKe2WWxPr8nGux zDkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=boRsUriPT4VTwIEclfzslcT2QU/MKHeClhdARBk4GqI=; b=mB15Iyp7uOkcNaAMyM1Lr3F02SXfURSw+FEuPx2n5eZ0mK8m2akiAIR7LLRMSULsRd uhE1p5jH9PUC7/KxpTzS4+329QTpNnfHEBM5ZOX8eTr0n42cgR7K+URg2f5ZRRuS+XKJ DFulipOuuIzyuFHXUdOwu1A/JCU1wn+jWqGzlZaq0+HWWC6dH9VN66rb1Aw/K2pnvxuv n/xlvcz44yOjmH5vnuln61lEaxUDvUFTa1AHDDHGO4OXawvwSWPdib298VDViqAhy1TH ak/uknpsAJkd3cLKMiTPrV7y7ud9dvXGJB77L/qfPsL6CXLbaYAHj8LQDNcag8niQywq OIHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RlOu1KNR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 j7-v6si14801653plt.349.2018.11.11.14.57.27; Sun, 11 Nov 2018 14:57:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RlOu1KNR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403922AbeKLIWy (ORCPT + 99 others); Mon, 12 Nov 2018 03:22:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:54672 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403914AbeKLIWx (ORCPT ); Mon, 12 Nov 2018 03:22:53 -0500 Received: from localhost (unknown [206.108.79.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 47188223DD; Sun, 11 Nov 2018 22:32:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975576; bh=jiXQMG0qua3MENfHKfqL1XcLRst8ccXg8lyIdoVQmME=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RlOu1KNR0ebWPjIqJWgNouXU/lx4PRrkbsimtieVI+p1vQK5MqHURJo8Koeguw4d9 dbI9ZOLtdfmmqdrlhm/uoRW00a53lZqkKoIAuCrrrZbkvZecBIo9TzJLo+yQQRdrMk JAG6ksSn4h2U4dVfdRTgh6zK3CUN5PHQD6gvkjY8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Kieran Bingham , David Laight , Masahiro Yamada , Andrew Morton , Linus Torvalds Subject: [PATCH 4.14 158/222] kbuild: fix kernel/bounds.c W=1 warning Date: Sun, 11 Nov 2018 14:24:15 -0800 Message-Id: <20181111221701.450543641@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221647.665769131@linuxfoundation.org> References: <20181111221647.665769131@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 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 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Arnd Bergmann commit 6a32c2469c3fbfee8f25bcd20af647326650a6cf upstream. 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 Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- kernel/bounds.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/kernel/bounds.c +++ b/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; }