From patchwork Mon Mar 4 20:34:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 159614 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp4185480jad; Mon, 4 Mar 2019 12:35:15 -0800 (PST) X-Google-Smtp-Source: APXvYqwSbWKYbaoBSORjOsHqwQbLeKrM5KvQrrEvCv6WMxSNt1J70Q4uBxxiD0+M+rJ1lppWHdiy X-Received: by 2002:a63:61d8:: with SMTP id v207mr20082176pgb.308.1551731715044; Mon, 04 Mar 2019 12:35:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551731715; cv=none; d=google.com; s=arc-20160816; b=q5wWVfnKui6CLM0/fMwQDLOZLv/c6VZ66h4Lg0TFAWt40B9pbkuTLjgQiXhgxZ+ZtH NiZL1BSYm72ZQEVVWD74bikwX9Vwb3sgcz2PllScH4dV1T5HfgW9QfUXrbeNIFUJpKpK oTPhM5MT6E6G656ORBVMBkmcgEKWfG3gvCGXiuSei1EGp8o27j5jm0YPgWwyk86hKjL/ tXcG+gvAAZtLCH3QV44l06PZVk+g8e04mNWVFeBnyxJAG/Ku+qEklCbvnTgtfxcbPVaO vFqjGvJ4UkD1fkmln0fqTtxlnx/ov9oZe4pcrsKX3mpNKxFImJEeAC/zV3h5oMICViuw GEOQ== 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 :message-id:date:subject:cc:to:from; bh=V1SyIjdaIiD4qmyOl+AgaGLR5WeQNUj0NdTMxQp8gHs=; b=Y3WXiJamnQKVg0WL3jaIBUpI2mzoDIYUdqj+twarf9UCPSETbf9PjJTE+Yo5PJ/Puj 7ajxiTx/rEI6eyPKlDUN7rK82zDJK4r8TcLti/oAhi7UYzKTX+Wgnri53oIq4l2b68IK 3GqU88j+aFCRYsTwUBwUSxDoPYO9DbA0wnMUjskSh98txcEpDU6WF8vXCabEslePCwp5 e1Qtx96WrDu+KmfdGEsEZecIXx+zOxgaKN5nlyAu/gkA3xIp5nL6+ZKwGLOTT8aDJ4V9 k/VPRZKTWKH98G5G5g5QsCUIBT29Yzw+L/C74ZFT8SLqCHy2NnMNGqOOIybmrwJwOgW1 NLHQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-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 x12si2427256pll.390.2019.03.04.12.35.14; Mon, 04 Mar 2019 12:35:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of netdev-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 netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726692AbfCDUfN (ORCPT + 10 others); Mon, 4 Mar 2019 15:35:13 -0500 Received: from mout.kundenserver.de ([212.227.126.135]:38375 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726076AbfCDUfM (ORCPT ); Mon, 4 Mar 2019 15:35:12 -0500 Received: from wuerfel.lan ([109.192.41.194]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.129]) with ESMTPA (Nemesis) id 1MyK9U-1hAkY524SK-00yii8; Mon, 04 Mar 2019 21:34:45 +0100 From: Arnd Bergmann To: Luis Chamberlain , Kees Cook , Alexei Starovoitov , Daniel Borkmann Cc: Arnd Bergmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrew Morton , Christian Brauner , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org Subject: [PATCH] bpf: fix sysctl.c warning Date: Mon, 4 Mar 2019 21:34:12 +0100 Message-Id: <20190304203443.1992942-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:lhdSW1MClS1OpT/SWuhIIv9Ek1tpe8udolndjPd+QDzE4nvOEE4 VI7bNGQYGB7yiZvLnjw7IcBi0aAAGjcRT2euQFwRQ0yrJRhghqUUJnHCmBwsHseRgYOtjdq hEhhnNvgb759fnPkBNdCEc+b6u434vmPbw9O2Gi/x63fpZhbWBu4KhgpT1/gMX4IqX9UF6o rv12ftNNH/Ko1YjohTTcg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:HshwpxYVGpA=:WWCNSSTL2KpTZHzuwghHl7 MnaEnbAiqK6dVJwcWhA/IjbiUF4KcQHwGS3VlBUH1fjshRRqE3aWfsn2d+5wvHK46s9mNZY+8 45z/0WyENHrsG0ZL+/zeJ3YuReB8ucI2vZu+47eWYeYiJukSiEZmr8NxKCMFbZ+NrcYZUvJOJ +O1FAnsSpSFiZRhrSVLaYvwvwSLIb3HbsI/8OXCHJtHwE3Tcx/c2FBHIVxgmwu3GJYkX1X/DT 3rDBbH8tpubU6L6YtYe95lRauw7tFde2TxbsZTSSEI4ySdWgS8c0ixpW/rB130BRFXmrsO2uv yCqZSgj1tilLNu7SNmOiTYAo9ZxSVW0gtnMv8s7fIP+n0/zg4umJdgr6eJess18i0+wgdwIZS bcf4R4pGkb32ODlZ/VfY/TblDRXAJnNvwLyCkjQNfv6kejAZur4RdREVDFNPLermLxX9iAXup mqRFjgYYxxkeJD5ptuW99iORYrswc8TpFEEwJyheTH9MG+PkTG/Sh9sb+n+kL22Im5yZVhYZy ZzyNEZl9nC8z+py8TJnXrQRXbIhC1vrz40aVC+4Bb8/GyY/DAJI6mf9VlBX/WDTBKuUrdnJhq pCIUHx8wYWYl6Pr7gtl79xdJXzBHGuhEihiBH49wzJ0OspvOmcZG8J5uRgocZTyfVPhD6yp6l DXRHbFsOagKedTB//mdOGStu0ZlYHSOqPbBAJDGRnwa+6z9OrVMn9Obww0wz2A0iwgXuZp7Df h/j98kKOAYv8o4LyomCigazFf3gY+VVBsHNMIA== Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org When CONFIG_BPF_SYSCALL or CONFIG_SYSCTL is disabled, we get a warning about an unused function: kernel/sysctl.c:3331:12: error: 'proc_dointvec_minmax_bpf_stats' defined but not used [-Werror=unused-function] static int proc_dointvec_minmax_bpf_stats(struct ctl_table *table, int write, The CONFIG_BPF_SYSCALL check was already handled, but the SYSCTL check is needed on top. Fixes: 492ecee892c2 ("bpf: enable program stats") Signed-off-by: Arnd Bergmann --- kernel/sysctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.0 diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 46a0d0a14a66..b3df3ab7ac28 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -3330,7 +3330,7 @@ int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write, #endif /* CONFIG_PROC_SYSCTL */ -#ifdef CONFIG_BPF_SYSCALL +#if defined(CONFIG_BPF_SYSCALL) && defined(CONFIG_SYSCTL) static int proc_dointvec_minmax_bpf_stats(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos)