Received: by 10.213.65.68 with SMTP id h4csp507134imn; Wed, 4 Apr 2018 02:17:26 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+mjQXKjapPsxrxnTsfM77DrpF6jds3J39Y/bNA+79xFBSJdNN0WmLfmJyuWxkfUOqcUFdA X-Received: by 2002:a17:902:28a4:: with SMTP id f33-v6mr17418269plb.115.1522833446346; Wed, 04 Apr 2018 02:17:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522833446; cv=none; d=google.com; s=arc-20160816; b=KliD9j0dyqF3i5PWx2aLC+xxzElYNZL6dKkBPbqsIvBGMWdbbiJ2X9h4GY3t3QmlbT aCyt+/i0ZbzAn8fx1T1xK+vuHe/mcjk6BvY4JuG9WkSh62Mf81zHpJmjmWKqAOp5KLx5 vG8chOgii38GcylV4Oe1HZtbRTXADsyN8yH84Bot/ZLubyzHDe48bCXrwhGaka7XQGnr N1lunJt7EybZ8FzwX+r09er7jZOR51e0sJU+FD6/oNZWkAUwOz9qPzN3p7b2a3F8Y+xQ FkfczlZSwMgEI6qF/QnOlRKmhSLibp4AGSDwGnCcLfnmjW6hmsHAymq0m/bMgYNBK1f4 4xDA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=RFMygPLjLBog6ORii96cAZONBOwlVd+mrg8113lPPYQ=; b=Tg+AcaYlzAUi0dToAENk25pQAwZvA1Lr/8zdhdk2uVp6ROMF75f8vxweVV0VgRK95N OEKVFuGyPGB369omppLbxppVYo6qXqtEPuPIzBcNey03vUq/aJT1BWyxT6pDu5ldrC9b NAArSoyD7riMSIEytkrlM5Cy1S+MEm71T/cBkrEb4Bza+dwuuSzbMf3xncOJDtAT7AHO /x9/yyIutFY13bdJlXDVebjkzsCMCMzmXhvOslCbkrSGIMjD9D2GCiTJ+c9x13r3eXyP FFINYWQWWUWH4b8RUQKywyFb3xiPH5+8QBNl8zIXLV76Xr1SXDQeAboIzlBko9+U6VXv YiFA== 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 c5si1913515pfn.386.2018.04.04.02.17.12; Wed, 04 Apr 2018 02:17:26 -0700 (PDT) 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 S1751968AbeDDJPc (ORCPT + 99 others); Wed, 4 Apr 2018 05:15:32 -0400 Received: from www62.your-server.de ([213.133.104.62]:42046 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751212AbeDDJPb (ORCPT ); Wed, 4 Apr 2018 05:15:31 -0400 Received: from [85.7.107.67] (helo=linux.home) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-SHA:256) (Exim 4.85_2) (envelope-from ) id 1f3eVt-0001qv-S5; Wed, 04 Apr 2018 11:15:29 +0200 Subject: Re: [PATCH] kernel/bpf/syscall: fix warning defined but not used To: Anders Roxell , ast@kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20180403120947.9321-1-anders.roxell@linaro.org> From: Daniel Borkmann Message-ID: <327e3c1f-860b-e2b4-7475-34a409c62fae@iogearbox.net> Date: Wed, 4 Apr 2018 11:15:29 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20180403120947.9321-1-anders.roxell@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.99.3/24448/Wed Apr 4 06:20:23 2018) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/03/2018 02:09 PM, Anders Roxell wrote: > There will be a build warning -Wunused-function if CONFIG_CGROUP_BPF > isn't defined, since the only user is inside #ifdef CONFIG_CGROUP_BPF: > kernel/bpf/syscall.c:1229:12: warning: ‘bpf_prog_attach_check_attach_type’ > defined but not used [-Wunused-function] > static int bpf_prog_attach_check_attach_type(const struct bpf_prog *prog, > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Current code moves function bpf_prog_attach_check_attach_type inside > ifdef CONFIG_CGROUP_BPF. > > Fixes: 5e43f899b03a ("bpf: Check attach type at prog load time") > Signed-off-by: Anders Roxell Applied to bpf tree, thanks Anders!