From patchwork Mon Mar 22 21:51:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 406181 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp3917211jai; Mon, 22 Mar 2021 14:52:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/PKhTu0cikI9y4EUp/5OUCdODrEuuPBo1uLnQcTmb9U0R0Xy2qo7AHxayIOSzy16A3bHj X-Received: by 2002:aa7:db15:: with SMTP id t21mr1647657eds.145.1616449963018; Mon, 22 Mar 2021 14:52:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616449963; cv=none; d=google.com; s=arc-20160816; b=benSjQnZBmF9etX6UAscGDvfSJI7+uDgEYQUNiy0cPkeTOXE5qEcdOej74Y3xRDmLF LotveqW/+Ohe5Np1iWS5isosiTWzhMO6l5G/2GvsbUeB0aZjURv0fETDc9eqm0ycDnUg Xvhj46t1OQcjJjvlVTmOemW86d10bb1aTlMkc1HSVIWqJGBwELl3nHMSgt/oaALU0qmy jN7GYqb+c8cQ3N5hPKNJD50U8m/IpLNetX76J76MjpzhywKA8TGVA/nsALjTqrMebt3U BZ/8ugXwjmLRZlWapwzIM7ohC0AYtZamINiADaO3sZZBkW4Z4A65dL5iXizsKM9VMDCO vFAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=j4uvFRWMsLFlgtu2tqXuVeH27C6bKgh2Bk4TuhSXwYU=; b=n7bLl79qwfbFOStfzF8XJWHrnaiWQdRgYJXUmPE8m1/hwblGwy1QE2Qrrf8SfcA2AB wToyZESnPxfvt8kxgaCy3Nd3c/yrQAgaJEQ1eDPqDvDkQP+BVQSUJJ7JAvdq2wFIJkTg wZIs3pteMZWCHqv/mdfORuhaQRrvy9a+MtGe6zulUPdHOAxQuwnTpnHfiKAyUkurNAok sxhHXhkKwO24zADaSmrJiweOdBIq/0j/29jrUR+FfW64MzXpQLlX5LjqPnPfq46Tsf8B K9CxaAOwUZ2o93QHV4lkx/B/8J7ZQKeCGjQ6jDAku2mS2YbLF6mu3VlABEwFHTVK11+u QKNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=knQg1MTN; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c11si14902498ejz.595.2021.03.22.14.52.42; Mon, 22 Mar 2021 14:52:43 -0700 (PDT) Received-SPF: pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=knQg1MTN; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229943AbhCVVwQ (ORCPT + 8 others); Mon, 22 Mar 2021 17:52:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:42476 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230203AbhCVVwG (ORCPT ); Mon, 22 Mar 2021 17:52:06 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8077B6191D; Mon, 22 Mar 2021 21:52:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616449926; bh=cynxWr4EIlyILN7JP7FRcyb1BaVwBjk2hMRHLfYM1x4=; h=From:To:Cc:Subject:Date:From; b=knQg1MTNIgrJ8FsQd53FmeWH1omD0zye6GeyRCGMavRNlOUYuAdhq3s7v5aNhcFYa LvdmT4vQ0Y4nRUgGlSbX3kT0744onMLv0ciZU9IUhPUAVVLaF2ZCnUXNXp976PNmWO /gvnbBAFvR9aQ0qGQKg03Cucq3YIAgOAJERJ1QAjedMGZGTbY7Anoy7syocsubSdwB mdMw+0vrLV1xLv8FrB41IFfHnqEliVwvyVt5oxP6gR0iDPmu2dBXheyRnhX1BNju/o 5fqM/U0RAuMeaYt28HrP9yFoy1rXuInmzhVkHzVq7cshq+ZfxkoSylOYabrZsNPVe8 1Lijx8ljY7BLA== From: Arnd Bergmann To: KP Singh , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Yonghong Song Cc: Arnd Bergmann , Florent Revest , Brendan Jackman , Song Liu , John Fastabend , Mikko Ylinen , Jiri Olsa , bpf@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] bpf: avoid old-style declaration warnings Date: Mon, 22 Mar 2021 22:51:51 +0100 Message-Id: <20210322215201.1097281-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann gcc -Wextra wants type modifiers in the normal order: kernel/bpf/bpf_lsm.c:70:1: error: 'static' is not at beginning of declaration [-Werror=old-style-declaration] 70 | const static struct bpf_func_proto bpf_bprm_opts_set_proto = { | ^~~~~ kernel/bpf/bpf_lsm.c:91:1: error: 'static' is not at beginning of declaration [-Werror=old-style-declaration] 91 | const static struct bpf_func_proto bpf_ima_inode_hash_proto = { | ^~~~~ Fixes: 3f6719c7b62f ("bpf: Add bpf_bprm_opts_set helper") Fixes: 27672f0d280a ("bpf: Add a BPF helper for getting the IMA hash of an inode") Signed-off-by: Arnd Bergmann --- kernel/bpf/bpf_lsm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.29.2 Acked-by: KP Singh diff --git a/kernel/bpf/bpf_lsm.c b/kernel/bpf/bpf_lsm.c index 1622a44d1617..75b1c678d558 100644 --- a/kernel/bpf/bpf_lsm.c +++ b/kernel/bpf/bpf_lsm.c @@ -67,7 +67,7 @@ BPF_CALL_2(bpf_bprm_opts_set, struct linux_binprm *, bprm, u64, flags) BTF_ID_LIST_SINGLE(bpf_bprm_opts_set_btf_ids, struct, linux_binprm) -const static struct bpf_func_proto bpf_bprm_opts_set_proto = { +static const struct bpf_func_proto bpf_bprm_opts_set_proto = { .func = bpf_bprm_opts_set, .gpl_only = false, .ret_type = RET_INTEGER, @@ -88,7 +88,7 @@ static bool bpf_ima_inode_hash_allowed(const struct bpf_prog *prog) BTF_ID_LIST_SINGLE(bpf_ima_inode_hash_btf_ids, struct, inode) -const static struct bpf_func_proto bpf_ima_inode_hash_proto = { +static const struct bpf_func_proto bpf_ima_inode_hash_proto = { .func = bpf_ima_inode_hash, .gpl_only = false, .ret_type = RET_INTEGER,