Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp2730748imb; Mon, 4 Mar 2019 12:37:17 -0800 (PST) X-Google-Smtp-Source: APXvYqwedq7QzMF+2LeP43WAZf02BMv57T65ESE9puw9NHrwi/D1VZo6z+2CcIaaSapHB0pJvHaR X-Received: by 2002:a63:a5b:: with SMTP id z27mr19850604pgk.78.1551731837187; Mon, 04 Mar 2019 12:37:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551731837; cv=none; d=google.com; s=arc-20160816; b=mtMm2CMluOmvwq9r3xvTxPDupHr1sRxDjDO5CY/AwZFaPO1p/EBxJcCz9CvB/k3Xn8 PBPP9rAczyzmE6MYnK3b+0PQaXEsdl+0/d/KsxovmJ/oMcjDildlTbyCad5zHKiiZZJl +OxzH8sdk7sVxoVLsGeVuLu12ZvoEy8J5PsxruUS72eL0cKbORZXfgVuFfZkTZzbpRtL kYztwWEDSp9bGfxx1K1DU4guChAWGzPSPwakfc0C0ABHlXTmraaWDbIJvlbZGXRubdqQ uZEVBrKUgOEBgvoKjyToLo7Svpzi2JU86e7ykn+KyapzopM1AF6EpsN0qqvR+OfUe37Z gj0A== 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=MudonewEfG4Cqaakt0TcINAgKCFtLE9hs2FziydHjjXPUH5mXqyQV8go4egXFypCZ1 QnPCXbgxoJAr1EzRC3Oy2ySYhJyunLwzO9HpjO4vAj+HQjMoY37kR5UM4PrZXhbtgtxO PoAMaeOlzJ8LziBXrH0v7+6vhBZELxBe/dZFC7UofdoRExwqsHK54PJDs8t5bjH5cOLz vfzuUTlCaHQJHln1dhCRtO2/7lnhgjS1nLrJLUC+gSo5mcKUpIjLWKjuyBIwBlaKqeZ1 X8UP94uQwBDfh49T2mOmYOdrdhSr2rqoQVSbAf82iVNHOxlKJSQINGfHJ9bTfSveQvF+ F/qQ== ARC-Authentication-Results: i=1; mx.google.com; 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 y4si6962855pfy.157.2019.03.04.12.37.00; Mon, 04 Mar 2019 12:37:17 -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; 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 S1726698AbfCDUfO (ORCPT + 99 others); Mon, 4 Mar 2019 15:35:14 -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 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o4LyomCigazFf3gY+VVBsHNMIA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(-) 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) -- 2.20.0