Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp2740778imb; Mon, 4 Mar 2019 12:57:55 -0800 (PST) X-Google-Smtp-Source: APXvYqyJAsrUbethI7hc546nTeqfijr2CEculBG2alnODRwp83ZQbjgJQiennR9hoqBC7H8IvrUn X-Received: by 2002:a63:8bc7:: with SMTP id j190mr20492629pge.382.1551733075819; Mon, 04 Mar 2019 12:57:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551733075; cv=none; d=google.com; s=arc-20160816; b=KAEfLIGIZULsyOTI/f+yMWeUeC9vMI7SdUYDipqS5w2rQEThjHj992kVSaGSGOJ8aZ bwKJVt+S5C6N2lnFAbUN44aNJmDGUrGp5It6bnSuzr+F7VZgksmC37xBKX6yhmWxMw9U wXLRQ5n/o3UGm/GfRltS0PEw4C8/HxM5TgVfSsLSrbBZmA+oO7XFvfHgQZkEXOYCN3O5 +Cmu8vDkQBzJESPLfGvzoLyrwtc1yoUSHjl/RI49fjWJLGVEp28yaDtHsvZy2vlBIabf 9ap/1ueQCSAzozgTEUxI+Wa2KoHkzx35zd1lBi9KyVJbeJyEQ2pmyC4GGij3bu6owcC2 fgjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Lfs+edcsPqw9VdJpJJBfthDSqQJQ/Sz5ubtx/mb4vh0=; b=08RJKL+UXoYV9STVhsiiiEBMEElzW8NFZ0w7M+KFByknowc0F+SaK/RFfibeK7YIZu x7uyX+uY27NKGn/k9ZsJr+pvJCOd5KdBYziW6Mhhz2FydUI52bUsubnYPISMoqLjASrD uiW8l0AbCvKOR78P2MjQ7KX6gb1DTp7KvAe+1yRwDXLWmU3lW5VQIsSnLvpUY4XK4IbM PdaIT0jcxVd7qeV9rnXBiHeQrFssupwtmGgKSv996+pxGdBPJKZSm5FRco65U2efG3Yo S66ZUaQc/H7sXf7JlkOc16lotPPf1gyxTDubIyP77AaeeAnWu6/cNDMJPU/6KSy6X3sW JWSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brauner.io header.s=google header.b=YqpQ+fke; 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 v3si5927830pgn.546.2019.03.04.12.57.40; Mon, 04 Mar 2019 12:57:55 -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=@brauner.io header.s=google header.b=YqpQ+fke; 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 S1726409AbfCDU5T (ORCPT + 99 others); Mon, 4 Mar 2019 15:57:19 -0500 Received: from mail-ed1-f68.google.com ([209.85.208.68]:38262 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726096AbfCDU5T (ORCPT ); Mon, 4 Mar 2019 15:57:19 -0500 Received: by mail-ed1-f68.google.com with SMTP id h58so5396684edb.5 for ; Mon, 04 Mar 2019 12:57:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brauner.io; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Lfs+edcsPqw9VdJpJJBfthDSqQJQ/Sz5ubtx/mb4vh0=; b=YqpQ+fkeYZyVDLUcP9Ep9pLbZ8qQy74vGru3GEz7x+EITVVUdssO7jIDOH/zHy7n7Y 6wrhYx/c7Neo0odFfr2hFEKokugCzaXJZbdU1EdaooE+mAg7RIqQKOC7a7/cUA26i5uV MXDr0Bxx2rYW8RYGbzOvCxbqVzm9O5BRIZ9jv0Xi3J2ZLteKK6zSz2mLcs4SIrlSlQPT cGX+1NWUHpYgU52cYTZ1RBM/kUReljre6WchYXdaYzPmUj7RQILGRmrVzpWdqQfWC/pg B3gZoIt2Xb8cRjmYtKJMkneWyY4F7tr+RlpgVmLYmqBZE+5dF2H7lFSleSkarykaaIad dUAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Lfs+edcsPqw9VdJpJJBfthDSqQJQ/Sz5ubtx/mb4vh0=; b=KnKTwUaKe3iVpkolxdH6eRq+eIGhGWsqZitV0Q+SDIS88AYfb4WsepV5krnZggn7aS Fr3teIio0nvGfpZVdYvDA/7N5ot2jeRKY5yL0BK7PaIz0unIw6yoMDl7h5IMfvGe7fn5 s2zQWcdtqxrbrhPuAuGOn2x24yU+ReEF9cu0Cyu0UbBVtYtEVxNE+dPFDFBtv69Aq9ov aJMimVV36q13C1LLo2+pETkJBGOCdLLLpV14vRljbEQ8yxMCKbFbZqy3lTU8JZ5EIVeo uX3mjh/6apGoe3fokcc+AU10uOirC19z2S4fcHrHu9EUsKpT6V/HmXwauwMKN7peTBMg +nJA== X-Gm-Message-State: APjAAAWjPUdiazJWbeBweqeTRikirjXFnSVrnGgpyeZaYPlIUpsGUeHc D0nDngYpD0cslZTN3rvlCgLHkw== X-Received: by 2002:a17:906:860e:: with SMTP id o14mr9242259ejx.202.1551733037325; Mon, 04 Mar 2019 12:57:17 -0800 (PST) Received: from brauner.io ([2a02:8109:b6c0:76e:3ddf:44fc:d22b:95ce]) by smtp.gmail.com with ESMTPSA id w31sm2397479edc.46.2019.03.04.12.57.15 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 04 Mar 2019 12:57:16 -0800 (PST) Date: Mon, 4 Mar 2019 21:57:15 +0100 From: Christian Brauner To: Arnd Bergmann Cc: Luis Chamberlain , Kees Cook , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrew Morton , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org Subject: Re: [PATCH] bpf: fix sysctl.c warning Message-ID: <20190304205714.rhpgpp26rbaghs2i@brauner.io> References: <20190304203443.1992942-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190304203443.1992942-1-arnd@arndb.de> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 04, 2019 at 09:34:12PM +0100, Arnd Bergmann wrote: > 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 Reviewed-by: Christian Brauner > --- > 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 >