Re: [PATCH bpf-next 08/14] bpf: introduce the bpf_get_local_storage() helper function

From: kbuild test robot
Date: Thu Jun 28 2018 - 16:03:10 EST


Hi Roman,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on bpf-next/master]

url: https://github.com/0day-ci/linux/commits/Roman-Gushchin/bpf-cgroup-local-storage/20180629-031527
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: i386-randconfig-x017-201825 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386

All warnings (new ones prefixed by >>):

kernel/bpf/helpers.c: In function '____bpf_get_local_storage':
>> kernel/bpf/helpers.c:206:9: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
return (u64)this_cpu_read(bpf_cgroup_storage);
^

vim +206 kernel/bpf/helpers.c

198
199 BPF_CALL_2(bpf_get_local_storage, struct bpf_map *, map, u64, flags)
200 {
201 /* map and flags arguments are not used now,
202 * but provide an ability to extend the API
203 * for other types of local storages.
204 * verifier checks that their values are correct.
205 */
> 206 return (u64)this_cpu_read(bpf_cgroup_storage);
207 }
208

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip