* [PATCH] 6lowpan: Remove unused pointer in lowpan_header_create()
@ 2014-02-07 21:58 Christian Engelmayer
2014-02-10 2:38 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Christian Engelmayer @ 2014-02-07 21:58 UTC (permalink / raw)
To: netdev; +Cc: Alexander Smirnov, Dmitry Eremin-Solenikov, Jukka Rissanen
[-- Attachment #1: Type: text/plain, Size: 944 bytes --]
Commit 8df8c56a (6lowpan: Moving generic compression code into 6lowpan_iphc.c)
left pointer 'hdr' unused - remove it.
Detected by Coverity: CID 1164868.
Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
---
net/ieee802154/6lowpan.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index 48b25c0..8bfb401 100644
--- a/net/ieee802154/6lowpan.c
+++ b/net/ieee802154/6lowpan.c
@@ -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;
--
1.8.3.2
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] 6lowpan: Remove unused pointer in lowpan_header_create()
2014-02-07 21:58 [PATCH] 6lowpan: Remove unused pointer in lowpan_header_create() Christian Engelmayer
@ 2014-02-10 2:38 ` David Miller
2014-02-10 17:40 ` Alexander Aring
0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2014-02-10 2:38 UTC (permalink / raw)
To: cengelma; +Cc: netdev, alex.bluesman.smirnov, dbaryshkov, jukka.rissanen
From: Christian Engelmayer <cengelma@gmx.at>
Date: Fri, 7 Feb 2014 22:58:38 +0100
> Commit 8df8c56a (6lowpan: Moving generic compression code into 6lowpan_iphc.c)
> left pointer 'hdr' unused - remove it.
>
> Detected by Coverity: CID 1164868.
>
> Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] 6lowpan: Remove unused pointer in lowpan_header_create()
2014-02-10 2:38 ` David Miller
@ 2014-02-10 17:40 ` Alexander Aring
2014-02-10 20:25 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Alexander Aring @ 2014-02-10 17:40 UTC (permalink / raw)
To: David Miller
Cc: cengelma, netdev, alex.bluesman.smirnov, dbaryshkov,
jukka.rissanen
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] 6lowpan: Remove unused pointer in lowpan_header_create()
2014-02-10 17:40 ` Alexander Aring
@ 2014-02-10 20:25 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2014-02-10 20:25 UTC (permalink / raw)
To: alex.aring
Cc: cengelma, netdev, alex.bluesman.smirnov, dbaryshkov,
jukka.rissanen
From: Alexander Aring <alex.aring@gmail.com>
Date: Mon, 10 Feb 2014 18:40:58 +0100
> 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-02-10 20:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-07 21:58 [PATCH] 6lowpan: Remove unused pointer in lowpan_header_create() Christian Engelmayer
2014-02-10 2:38 ` David Miller
2014-02-10 17:40 ` Alexander Aring
2014-02-10 20:25 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).