bpf: Make array_map_mmap static
authorYueHaibing <yuehaibing@huawei.com>
Tue, 19 Nov 2019 14:21:13 +0000 (22:21 +0800)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 20 Nov 2019 00:57:32 +0000 (16:57 -0800)
Fix sparse warning:

kernel/bpf/arraymap.c:481:5: warning:
 symbol 'array_map_mmap' was not declared. Should it be static?

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/20191119142113.15388-1-yuehaibing@huawei.com
kernel/bpf/arraymap.c

index a42097c36b0c75a1a5257e24b52f2530e287c134..633c8c701ff66cb7839247982f0d739bf3bd4bcb 100644 (file)
@@ -478,7 +478,7 @@ static int array_map_check_btf(const struct bpf_map *map,
        return 0;
 }
 
-int array_map_mmap(struct bpf_map *map, struct vm_area_struct *vma)
+static int array_map_mmap(struct bpf_map *map, struct vm_area_struct *vma)
 {
        struct bpf_array *array = container_of(map, struct bpf_array, map);
        pgoff_t pgoff = PAGE_ALIGN(sizeof(*array)) >> PAGE_SHIFT;