linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Eric Dumazet <edumazet@google.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: [linux-next:master 3790/4834] net/ipv6/raw.c:338:33: warning: variable 'daddr' set but not used
Date: Tue, 21 Jun 2022 20:42:00 +0800	[thread overview]
Message-ID: <202206212033.3lgl72Fw-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   34d1d36073ea4d4c532e8c8345627a9702be799e
commit: ba44f8182ec299c5d1c8a72fc0fde4ec127b5a6d [3790/4834] raw: use more conventional iterators
config: i386-randconfig-a012-20220620 (https://download.01.org/0day-ci/archive/20220621/202206212033.3lgl72Fw-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project af6d2a0b6825e71965f3e2701a63c239fa0ad70f)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=ba44f8182ec299c5d1c8a72fc0fde4ec127b5a6d
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout ba44f8182ec299c5d1c8a72fc0fde4ec127b5a6d
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash net/ipv6/

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/ipv6/raw.c:338:33: warning: variable 'daddr' set but not used [-Wunused-but-set-variable]
           const struct in6_addr *saddr, *daddr;
                                          ^
>> net/ipv6/raw.c:338:25: warning: variable 'saddr' set but not used [-Wunused-but-set-variable]
           const struct in6_addr *saddr, *daddr;
                                  ^
   2 warnings generated.


vim +/daddr +338 net/ipv6/raw.c

   334	
   335	void raw6_icmp_error(struct sk_buff *skb, int nexthdr,
   336			u8 type, u8 code, int inner_offset, __be32 info)
   337	{
 > 338		const struct in6_addr *saddr, *daddr;
   339		struct net *net = dev_net(skb->dev);
   340		struct hlist_head *head;
   341		struct sock *sk;
   342		int hash;
   343	
   344		hash = nexthdr & (RAW_HTABLE_SIZE - 1);
   345		head = &raw_v6_hashinfo.ht[hash];
   346		read_lock(&raw_v6_hashinfo.lock);
   347		sk_for_each(sk, head) {
   348			/* Note: ipv6_hdr(skb) != skb->data */
   349			const struct ipv6hdr *ip6h = (const struct ipv6hdr *)skb->data;
   350			saddr = &ip6h->saddr;
   351			daddr = &ip6h->daddr;
   352	
   353			if (!raw_v6_match(net, sk, nexthdr, &ip6h->saddr, &ip6h->daddr,
   354					  inet6_iif(skb), inet6_iif(skb)))
   355				continue;
   356			rawv6_err(sk, skb, NULL, type, code, inner_offset, info);
   357		}
   358		read_unlock(&raw_v6_hashinfo.lock);
   359	}
   360	

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


                 reply	other threads:[~2022-06-21 12:42 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=202206212033.3lgl72Fw-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=edumazet@google.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-mm@kvack.org \
    --cc=llvm@lists.linux.dev \
    /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