Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3475076imu; Sun, 11 Nov 2018 15:58:02 -0800 (PST) X-Google-Smtp-Source: AJdET5e10i0QCxl4CvTgrosgSL75l71JxGMkD4HO2L9Hexe2u7vNwVeqek4VAsleF7hmuhEQh33t X-Received: by 2002:aa7:828a:: with SMTP id s10-v6mr17611243pfm.63.1541980682095; Sun, 11 Nov 2018 15:58:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541980682; cv=none; d=google.com; s=arc-20160816; b=ONjV2Aw9NneRa9LMk8OAB/jkfVLxyxSbFxpq+xOWIAWMCBY/7DY80GACy6Qi7QhKWf DuIjE75NlcFzvjTthRaWpF+KbgGIWvAqpfidSOQ+0hj5zvRMmPOXPI5QJz36hU06re7U 05ac4yeQCr0T5+u1K8VZ9mRSj9zzHC5EpY0w1QZ/P6CTDLVAICCeLadV2FueTii1L7U8 CAvqGuzGAYOW00e9iPAWPFtz38iopUl/IYIJFj8wL2Eg/C6PPuTjHxlVvS6fAbZolriv 3pHgYiNQVMEOIRWe+MpvBCOh2k5kIMiUae46DYP044qaH0x7ykG3FVBDUYh8C0+Cf8AF uKLA== 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=KuvcQLpCCVghQigC/3s0itvwsls6uaxaxvElpaAWbf8=; b=naw6IYWFeFc97fn2mgSzToDQT7JuCkQfZbxY6slgOfgwaNEO6hAdTdIAAqno0C751e IjqyTzGbRGzfDIqzTlFp+PIMqeIHZ0IQV/i7MipFHlNlxWqaNCcHLQUZ+6ma21lOqunH KsLlzO5/ILnIe9zSt9QXQVE1I0Pj1QeqruW4+rVUOwwySGK/j+/rYNf5kQbxdcZWrMvj wmpz/mShmuGfXDozI/rWatSfTkQkX+f26hN2d21knnTejrhO2EKfsyztqbamnFOVVkGF Wo5RAw096/bFmxlHUvPQl60lkaxLELGcNnAcRVC6e2bKhHbmW1qoSWZ7HwTMOnndo3+c DHvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="jHY/doyK"; 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 k15-v6si15560922pll.216.2018.11.11.15.57.47; Sun, 11 Nov 2018 15:58:02 -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="jHY/doyK"; 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 S1732853AbeKLJqh (ORCPT + 99 others); Mon, 12 Nov 2018 04:46:37 -0500 Received: from mail.kernel.org ([198.145.29.99]:34210 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732575AbeKLISP (ORCPT ); Mon, 12 Nov 2018 03:18:15 -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 4C92521707; Sun, 11 Nov 2018 22:28:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975299; bh=hTWr3X24XRC0Op1U8qGvydHrXA2AlBb6kRtUWB6u5dA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jHY/doyK9FU9vWK0FYsR//7lkB0msy0Qw/gb61WogKAjUuRKaBziz/aMc9Dt2EDAU f6ljeF4/Sf/6YVuSJka+ID9aASbtk36k0L8caCVVvacvhohZ7hdPLnglVdAQWHyPEr vxzAHfA7xTzK/0XtY+eqo8VVTBkeAT79uGUV0rrQ= 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.19 257/361] kbuild: fix kernel/bounds.c W=1 warning Date: Sun, 11 Nov 2018 14:20:04 -0800 Message-Id: <20181111221653.657445058@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221619.915519183@linuxfoundation.org> References: <20181111221619.915519183@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.19-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; }