Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2995135imu; Mon, 19 Nov 2018 09:07:28 -0800 (PST) X-Google-Smtp-Source: AJdET5cgAp38rCyIykjMOWq5K+YpT4SYpOLtCJJVywxMLQWcCnSZIR2oKQQVs8mku5wEYFyOSbK5 X-Received: by 2002:a63:5f95:: with SMTP id t143mr21118123pgb.395.1542647248741; Mon, 19 Nov 2018 09:07:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542647248; cv=none; d=google.com; s=arc-20160816; b=OIPOd54Chns4VayFIdHVT0Eb0vwU/sgHrf1rWMNZXWQ2YeoRBqnDa9vdW8KamDPWvG Vk/nO2zotMRwQAUN13oAkTx/Pu+/ikVUfXdrurE5nMcXgaX4jHpXTpdKJXE0XHpycwfZ JizeRXG7n11b33M65Udy/+sQptAgl1h8rk0PQ8hczMbELXckZSFDJp0wefB/OvUa/NXK Y20wn/RENhBXJO3j0U8LQqASa+WPBPAQmJmuzN2eA/yLd0J5XcYf5iasS8NpBxFZXjmS sP6Snluu0dkxiSG176asclvk2sEO0vsn93flksgWtKKLVAprY6DTm8JnYCfxROgSmeIl hbEQ== 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=hti8wSzBbaZXpg22+hs6EcapIvSLTIzvQsWd/P27Ksw=; b=1AtKB4V0tOIILVoqKoRh2AlmC+E/TFqwfD+AyYxjBrqW6qG/LVa3AlV0mFSWBfy1Ka aRmLBEjRSEcDpRdKISMOWnuXDPDOc2BS5ntdx7EaNLJuSPzCiIxA3fgBKuKL59PovDRn VBWwUzZeID2eeVNQsA/XkJ70GAwG6FFK4vuWgy/DK59HGdGK9setbc4oroei8wuh9P55 3AlWiYV59XDvt5aN/LbTGDBzhqWT3nuzDKvjmPX6QTnlvLBtR41nYdS+b4OHVT9qHML9 uAW2F4xphbR8g/p0YcneSfe7u9tk5atiekT3tPOjAxzqCGCouXICa23E/VqLW7Sh7/nB 9LKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VogZ1cuk; 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 w1-v6si44596530plk.317.2018.11.19.09.07.13; Mon, 19 Nov 2018 09:07:28 -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=VogZ1cuk; 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 S2406505AbeKTD2g (ORCPT + 99 others); Mon, 19 Nov 2018 22:28:36 -0500 Received: from mail.kernel.org ([198.145.29.99]:42972 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406494AbeKTD2f (ORCPT ); Mon, 19 Nov 2018 22:28:35 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (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 8BFD3214D9; Mon, 19 Nov 2018 17:04:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542647058; bh=pozPn9haEuypv2AoQVgEofmtzyq2xEDk9mgIUeQrW8c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VogZ1cuk9724aQWSCm2tSD59vlRKVWpxqMcEvGYxmyE/+nVndCkUvF5pP5dggeXaz 88JgF7/jMqGesOe4NV0391/aNs4+yidDePXtCcCUn6ZEGD+HKzpCC8trsFEZ6OJS0p FG5fB9/xrW8UZ9bB0VthU4bBLvKYzyaGRyhdMfKM= 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 3.18 35/90] kbuild: fix kernel/bounds.c W=1 warning Date: Mon, 19 Nov 2018 17:29:17 +0100 Message-Id: <20181119162626.520784156@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181119162620.585061184@linuxfoundation.org> References: <20181119162620.585061184@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 3.18-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 @@ -12,7 +12,7 @@ #include #include -void foo(void) +int main(void) { /* The enum constants to put into include/generated/bounds.h */ DEFINE(NR_PAGEFLAGS, __NR_PAGEFLAGS); @@ -22,4 +22,6 @@ void foo(void) #endif DEFINE(SPINLOCK_SIZE, sizeof(spinlock_t)); /* End of constants */ + + return 0; }