Message ID | 20191119142113.15388-1-yuehaibing@huawei.com |
---|---|
State | Accepted |
Delegated to: | BPF Maintainers |
Headers | show |
Series | [bpf-next] bpf: Make array_map_mmap static | expand |
On Tue, Nov 19, 2019 at 6:22 AM YueHaibing <yuehaibing@huawei.com> wrote: > > 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> > --- Yes it should, thanks! Acked-by: Andrii Nakryiko <andriin@fb.com> [...]
On Tue, Nov 19, 2019 at 6:21 AM YueHaibing <yuehaibing@huawei.com> wrote: > > 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> Applied. Thanks
diff --git a/kernel/bpf/arraymap.c b/kernel/bpf/arraymap.c index a42097c..633c8c7 100644 --- a/kernel/bpf/arraymap.c +++ b/kernel/bpf/arraymap.c @@ -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;
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> --- kernel/bpf/arraymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)