lkml.org 
[lkml]   [2022]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[congwang:sch_bpf 3/5] net/core/skb_map.c:414:21: warning: cast to pointer from integer of different size
tree:   https://github.com/congwang/linux.git sch_bpf
head: 88a2f876b0736617600bfaa2301dbfdaaa139ddd
commit: 03e158bc84030847ce9f7bf91b1221079c194f3d [3/5] bpf: introduce skb map
config: i386-randconfig-a003 (https://download.01.org/0day-ci/archive/20220531/202205311853.M58G3t1Z-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-1) 11.3.0
reproduce (this is a W=1 build):
# https://github.com/congwang/linux/commit/03e158bc84030847ce9f7bf91b1221079c194f3d
git remote add congwang https://github.com/congwang/linux.git
git fetch --no-tags congwang sch_bpf
git checkout 03e158bc84030847ce9f7bf91b1221079c194f3d
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash net/core/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

net/core/skb_map.c: In function '____bpf_flow_map_pop':
>> net/core/skb_map.c:414:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
414 | u64 rank = *(u64 *) key;
| ^
net/core/skb_map.c: In function '____bpf_flow_map_push':
net/core/skb_map.c:460:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
460 | u64 rank = *(u64 *) key;
| ^


vim +414 net/core/skb_map.c

410
411 BPF_CALL_2(bpf_flow_map_pop, struct bpf_map *, map, u64, key)
412 {
413 struct bpf_skb_map *rb = bpf_skb_map(map);
> 414 u64 rank = *(u64 *) key;
415 struct bpf_map *target;
416 unsigned long flags;
417
418 raw_spin_lock_irqsave(&rb->lock, flags);
419 target = map_rb_find(&rb->root, rank);
420 if (!target) {
421 raw_spin_unlock_irqrestore(&rb->lock, flags);
422 return (unsigned long)NULL;
423 }
424 rb_erase(&bpf_skb_map(target)->node, &rb->root);
425 raw_spin_unlock_irqrestore(&rb->lock, flags);
426 atomic_dec(&rb->count);
427 return (unsigned long)target;
428 }
429

--
0-DAY CI Kernel Test Service
https://01.org/lkp

\
 
 \ /
  Last update: 2022-05-31 13:01    [W:1.080 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site