Skip to content

Commit

Permalink
bpf: Make array_map_mmap static
Browse files Browse the repository at this point in the history
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
  • Loading branch information
YueHaibing authored and Alexei Starovoitov committed Nov 20, 2019
1 parent 24f6505 commit b2e2f0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/bpf/arraymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b2e2f0e

Please sign in to comment.