GNU/Weeb Mailing List <[email protected]>
 help / color / mirror / Atom feed
* [ammarfaizi2-block:stable/linux-stable-rc/queue/5.19 369/1034] net/ipv6/raw.c:338:40: warning: variable 'daddr' set but not used
@ 2022-08-13 23:40 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-08-13 23:40 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: kbuild-all, Ammar Faizi, GNU/Weeb Mailing List, linux-kernel,
	Sasha Levin

tree:   https://github.com/ammarfaizi2/linux-block stable/linux-stable-rc/queue/5.19
head:   a93eab25d54766b1d89d7fa7dd315b3fc268d0b5
commit: 097153d36084aaae5c40688aa5a424ac8d9cca5f [369/1034] raw: use more conventional iterators
config: i386-defconfig (https://download.01.org/0day-ci/archive/20220814/[email protected]/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/ammarfaizi2/linux-block/commit/097153d36084aaae5c40688aa5a424ac8d9cca5f
        git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
        git fetch --no-tags ammarfaizi2-block stable/linux-stable-rc/queue/5.19
        git checkout 097153d36084aaae5c40688aa5a424ac8d9cca5f
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make 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 <[email protected]>

All warnings (new ones prefixed by >>):

   net/ipv6/raw.c: In function 'raw6_icmp_error':
>> net/ipv6/raw.c:338:40: warning: variable 'daddr' set but not used [-Wunused-but-set-variable]
     338 |         const struct in6_addr *saddr, *daddr;
         |                                        ^~~~~
>> net/ipv6/raw.c:338:32: warning: variable 'saddr' set but not used [-Wunused-but-set-variable]
     338 |         const struct in6_addr *saddr, *daddr;
         |                                ^~~~~


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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-13 23:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-13 23:40 [ammarfaizi2-block:stable/linux-stable-rc/queue/5.19 369/1034] net/ipv6/raw.c:338:40: warning: variable 'daddr' set but not used kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox