Skip to contentSkip to conversation

6lowpan: Remove unused pointer in lowpan_header_create()

PATCH Applied Christian Engelmayer 3 participants 4 messages Feb 7, 2014 – Feb 10, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 6lowpan: Remove unused pointer in lowpan_header_create()

Commit 8df8c56a (6lowpan: Moving generic compression code into 6lowpan_iphc.c) left pointer 'hdr' unused - remove it.

Detected by Coverity: CID 1164868.

---
 net/ieee802154/6lowpan.c | 3 ---
 1 file changed, 3 deletions(-)
net/ieee802154/6lowpan.c +0 -3
index 48b25c0..8bfb401 100644
@@ -106,7 +106,6 @@ static int lowpan_header_create(struct sk_buff *skb,
 			   unsigned short type, const void *_daddr,
 			   const void *_saddr, unsigned int len)
 {
-	struct ipv6hdr *hdr;
 	const u8 *saddr = _saddr;
 	const u8 *daddr = _daddr;
 	struct ieee802154_addr sa, da;
@@ -117,8 +116,6 @@ static int lowpan_header_create(struct sk_buff *skb,
 	if (type != ETH_P_IPV6)
 		return 0;
 
-	hdr = ipv6_hdr(skb);
-
 	if (!saddr)
 		saddr = dev->dev_addr;
 
Signature · 1 line
1.8.3.2
maintainer
#2 lore raw

Hi,

I need the hdr pointer for my upcomming patches. Nevertheless it should be removed... it's not used anymore.

I am wondering why this patch was accepted, it's not a bug fix. Is net-next open again?

- Alex

maintainer
#3 lore raw

From: Alexander Aring <[email protected]>
Date: Mon, 10 Feb 2014 18:40:58 +0100

Quoted 5 lines

I need the hdr pointer for my upcomming patches. Nevertheless it should be removed... it's not used anymore.

I am wondering why this patch was accepted, it's not a bug fix. Is net-next open again?

Unused variables make code difficult to audit for bugs and similar.

Sometimes I apply patches like these for net, net-next is not open yet.