From patchwork Thu Jun 9 04:18:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zi Shen Lim X-Patchwork-Id: 9166193 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A520A60467 for ; Thu, 9 Jun 2016 04:21:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9832728307 for ; Thu, 9 Jun 2016 04:21:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8D26128309; Thu, 9 Jun 2016 04:21:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1A664281F9 for ; Thu, 9 Jun 2016 04:21:34 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1bArRP-0006MM-2J; Thu, 09 Jun 2016 04:19:35 +0000 Received: from mail-pa0-x242.google.com ([2607:f8b0:400e:c03::242]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1bArRL-0006Kc-MW for linux-arm-kernel@lists.infradead.org; Thu, 09 Jun 2016 04:19:32 +0000 Received: by mail-pa0-x242.google.com with SMTP id di3so1838137pab.0 for ; Wed, 08 Jun 2016 21:19:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=SrfHn/xBGlWwpFQtXzpQGQvs3urnB7Cdf1FJE703LpY=; b=C56J0yWfhAttr9LcmZGgMdY7N42Eh+okN3fp3RxqZCm8VDJpVGXasOCGl1Q3xg85iK JRCr8trKxNvCB0/MZ6w3B4Fz9quDV/lyxprp/Kfw0CkXd8tfDSDVqIgDeZP5CNV0fkJA 593DPxB92/gxabdktxk32S36TAbPbAWd8/Lg3Buzib+FCyo4oCSKy/6X5hYk8SiAB/3U 7TiH7m0o9K2DZ+P+Z5/hAvbjA8v4zbz+ZOwckidhdTCNRC/H59AM5ClbHLkBI1mWfnz4 QYID0hfSJZiXqjhZzU5fggq1arouY9o4Tkh0SrxMV0ZX87JAbL+spNhwu/eJSryxhYsW TkqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=SrfHn/xBGlWwpFQtXzpQGQvs3urnB7Cdf1FJE703LpY=; b=JnMooou6OAeT+oj6BMgKIf6NRZriHHxnjLgHHCvSw/w9UGbgm/T9APjmgprZJMNeb+ 8V04/vH1v6tl3FsKRXV7MLE0cV1E5dWiYtb/jW7O6b7+Ia7de3pssL6RFJ6EngtFIYtg 4KMf1eMIPrb/F9l5lIJs638N+Y8C1zPkCtvvig1emX5KBksfz5VeT8zC5bEmB1tYCRCG tfejpx2ah3FdHNwBwQj9zQUPEZCUVhyPGRlJHQWzKn+Xe8s9TGESXkDEqrPb+jozglk3 94VNUuLcGBfnkMORkfV6LHKQOztx++uHgWt5TXsQKaP8X/tXZzoeQwcVoJzCda3bq5/+ eXqA== X-Gm-Message-State: ALyK8tIBBb5Ju5QavHfhsR+Bzf3krdQ3UGF3ZnVJa+/p6TWEgpr6+2X8xjqqcnQns/bftQ== X-Received: by 10.66.251.2 with SMTP id zg2mr9845921pac.32.1465445950976; Wed, 08 Jun 2016 21:19:10 -0700 (PDT) Received: from localhost.localdomain (c-73-223-118-172.hsd1.ca.comcast.net. [73.223.118.172]) by smtp.gmail.com with ESMTPSA id c13sm5848579pfc.40.2016.06.08.21.19.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Jun 2016 21:19:10 -0700 (PDT) From: Zi Shen Lim To: "David S. Miller" , Catalin Marinas , Will Deacon Subject: [PATCH net-next v3 1/4] bpf: fix missing header inclusion Date: Wed, 8 Jun 2016 21:18:47 -0700 Message-Id: <1465445930-3960-2-git-send-email-zlim.lnx@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1465445930-3960-1-git-send-email-zlim.lnx@gmail.com> References: <1465445930-3960-1-git-send-email-zlim.lnx@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160608_211931_801390_72DE9A3D X-CRM114-Status: GOOD ( 12.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yang Shi , Daniel Borkmann , Zi Shen Lim , Alexei Starovoitov , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Commit 0fc174dea545 ("ebpf: make internal bpf API independent of CONFIG_BPF_SYSCALL ifdefs") introduced usage of ERR_PTR() in bpf_prog_get(), however did not include linux/err.h. Without this patch, when compiling arm64 BPF without CONFIG_BPF_SYSCALL: ... In file included from arch/arm64/net/bpf_jit_comp.c:21:0: include/linux/bpf.h: In function 'bpf_prog_get': include/linux/bpf.h:235:9: error: implicit declaration of function 'ERR_PTR' [-Werror=implicit-function-declaration] return ERR_PTR(-EOPNOTSUPP); ^ include/linux/bpf.h:235:9: warning: return makes pointer from integer without a cast [-Wint-conversion] In file included from include/linux/rwsem.h:17:0, from include/linux/mm_types.h:10, from include/linux/sched.h:27, from arch/arm64/include/asm/compat.h:25, from arch/arm64/include/asm/stat.h:23, from include/linux/stat.h:5, from include/linux/compat.h:12, from include/linux/filter.h:10, from arch/arm64/net/bpf_jit_comp.c:22: include/linux/err.h: At top level: include/linux/err.h:23:35: error: conflicting types for 'ERR_PTR' static inline void * __must_check ERR_PTR(long error) ^ In file included from arch/arm64/net/bpf_jit_comp.c:21:0: include/linux/bpf.h:235:9: note: previous implicit declaration of 'ERR_PTR' was here return ERR_PTR(-EOPNOTSUPP); ^ ... Fixes: 0fc174dea545 ("ebpf: make internal bpf API independent of CONFIG_BPF_SYSCALL ifdefs") Suggested-by: Daniel Borkmann Signed-off-by: Zi Shen Lim Acked-by: Daniel Borkmann --- include/linux/bpf.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/bpf.h b/include/linux/bpf.h index 8ee27b8..1bcae82 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -11,6 +11,7 @@ #include #include #include +#include struct bpf_map;