mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: [congwang:sch_bpf 3/5] net/core/skb_map.c:414:21: warning: cast to pointer from integer of different size
Date: Tue, 31 May 2022 19:00:58 +0800	[thread overview]
Message-ID: <202205311853.M58G3t1Z-lkp@intel.com> (raw)

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

                 reply	other threads:[~2022-05-31 11:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202205311853.M58G3t1Z-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xiyou.wangcong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®