Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp310669ybh; Sat, 18 Jul 2020 04:54:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqRy9S+Y4DFBlKM40eB+ny1Z7GFXJM7AjW+10Y8T35fJBklaLojGdjU4xAZsytN1qds4AW X-Received: by 2002:a17:906:7743:: with SMTP id o3mr12276811ejn.224.1595073246795; Sat, 18 Jul 2020 04:54:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595073246; cv=none; d=google.com; s=arc-20160816; b=lvGk43O3QuZtBXET7+8zITfsYh5KWcxDru1/7etsxK32+M7LJOEbIIPU3PnYxzkM9J sBZHmicArK6ldDSkgKCoUWcSoY0mY2iQL64y1fyQP7FxlX68nKo01EZMIp6rqRJ1ic1G fFaWgpI7o97h6ACA1O5gt6l1s1pOoY7eOy3En1+5LjBNyHmKeI+DIaouHzAWHEiTEup0 4ZovXlDbpK4WGZJZFojRKxUcnY8ZqEyVz0ejpxFY0EYJaqI1UK6o3zhBozuovq4ga6Et kq7cFa60kovqfaobOdLKCKZ/T6djlP8iB3hAFzDsCZopSVl/thv3A4m/xEzhCFYVGXeW a3mQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=Frsp5ZnQt4K7Us3cDRFpoXZA/gW1k7XmMiXy/3DUjbM=; b=nCwO6DyAFZfthn8Av6xkjUjGl84DLOYr+WUbVrl7+ZMt7J+Hgeag7saXeuZn/6ezLY a1Xle8sV42Iio9FlIkeDRDdEmc97GcqirAKzvAcFFMTrV+ivXa+vtYLbdggSEOOb4lj7 vL4ZK/Gp90UvlTo6Xuhuoqqla8PrbZWJiTlLvSBWX+YhY+RVwfz5eXUjf21jAvQPoV0p 0rtduq93PRBbAJ142Mbv5Y6S9YJp6jLbEmmOe0PkFE0GAoo8ofrMdJ3amvUHAB+mTauI xrDtlQmkJKLsKWMXjlFjMKLOTlXLACjvaxCAS1RwhiaIM9616kHAttmK+zdT7VtEbuLW qVww== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p15si6833611ejg.22.2020.07.18.04.53.43; Sat, 18 Jul 2020 04:54:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726885AbgGRLxD (ORCPT + 99 others); Sat, 18 Jul 2020 07:53:03 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:39076 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726481AbgGRLxD (ORCPT ); Sat, 18 Jul 2020 07:53:03 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id E8ABE508C0CCB2E37E53; Sat, 18 Jul 2020 19:53:00 +0800 (CST) Received: from huawei.com (10.175.113.133) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.487.0; Sat, 18 Jul 2020 19:52:59 +0800 From: Wang Hai To: , , , , , , , , , CC: , , Subject: [PATCH -next] bpf: Make some functions static Date: Sat, 18 Jul 2020 19:51:35 +0800 Message-ID: <20200718115135.34856-1-wanghai38@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.113.133] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix sparse build warning: net/bpf/test_run.c:120:14: warning: symbol 'bpf_fentry_test1' was not declared. Should it be static? net/bpf/test_run.c:125:14: warning: symbol 'bpf_fentry_test2' was not declared. Should it be static? net/bpf/test_run.c:130:14: warning: symbol 'bpf_fentry_test3' was not declared. Should it be static? net/bpf/test_run.c:135:14: warning: symbol 'bpf_fentry_test4' was not declared. Should it be static? net/bpf/test_run.c:140:14: warning: symbol 'bpf_fentry_test5' was not declared. Should it be static? net/bpf/test_run.c:145:14: warning: symbol 'bpf_fentry_test6' was not declared. Should it be static? net/bpf/test_run.c:154:14: warning: symbol 'bpf_fentry_test7' was not declared. Should it be static? net/bpf/test_run.c:159:14: warning: symbol 'bpf_fentry_test8' was not declared. Should it be static? net/bpf/test_run.c:164:14: warning: symbol 'bpf_modify_return_test' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: Wang Hai --- net/bpf/test_run.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/net/bpf/test_run.c b/net/bpf/test_run.c index b03c469cd01f..0d78bd9b6c9d 100644 --- a/net/bpf/test_run.c +++ b/net/bpf/test_run.c @@ -117,32 +117,32 @@ static int bpf_test_finish(const union bpf_attr *kattr, __diag_push(); __diag_ignore(GCC, 8, "-Wmissing-prototypes", "Global functions as their definitions will be in vmlinux BTF"); -int noinline bpf_fentry_test1(int a) +static noinline int bpf_fentry_test1(int a) { return a + 1; } -int noinline bpf_fentry_test2(int a, u64 b) +static noinline int bpf_fentry_test2(int a, u64 b) { return a + b; } -int noinline bpf_fentry_test3(char a, int b, u64 c) +static noinline int bpf_fentry_test3(char a, int b, u64 c) { return a + b + c; } -int noinline bpf_fentry_test4(void *a, char b, int c, u64 d) +static noinline int bpf_fentry_test4(void *a, char b, int c, u64 d) { return (long)a + b + c + d; } -int noinline bpf_fentry_test5(u64 a, void *b, short c, int d, u64 e) +static noinline int bpf_fentry_test5(u64 a, void *b, short c, int d, u64 e) { return a + (long)b + c + d + e; } -int noinline bpf_fentry_test6(u64 a, void *b, short c, int d, void *e, u64 f) +static noinline int bpf_fentry_test6(u64 a, void *b, short c, int d, void *e, u64 f) { return a + (long)b + c + d + (long)e + f; } @@ -151,17 +151,17 @@ struct bpf_fentry_test_t { struct bpf_fentry_test_t *a; }; -int noinline bpf_fentry_test7(struct bpf_fentry_test_t *arg) +static noinline int bpf_fentry_test7(struct bpf_fentry_test_t *arg) { return (long)arg; } -int noinline bpf_fentry_test8(struct bpf_fentry_test_t *arg) +static noinline int bpf_fentry_test8(struct bpf_fentry_test_t *arg) { return (long)arg->a; } -int noinline bpf_modify_return_test(int a, int *b) +static noinline int bpf_modify_return_test(int a, int *b) { *b += 1; return a + *b; -- 2.17.1