public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Marcel Holtmann <marcel@holtmann.org>,
	Gustavo Padovan <gustavo@padovan.org>,
	Johan Hedberg <johan.hedberg@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	"David S. Miller" <davem@davemloft.net>,
	Stefan Schmidt <stefan@osg.samsung.com>,
	Jukka Rissanen <jukka.rissanen@linux.intel.com>,
	Luiz Augusto von Dentz <luiz.von.dentz@intel.com>,
	Eric Dumazet <edumazet@google.com>,
	Patrik Flykt <patrik.flykt@linux.intel.com>,
	Alexander Aring <aar@pengutronix.de>,
	Glenn Ruben Bakke <glennrubenbakke@nordicsemi.no>,
	linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] 6lowpan: set peer_addr correctly again
Date: Tue, 28 Mar 2017 15:29:08 +0200	[thread overview]
Message-ID: <20170328132935.382216-1-arnd@arndb.de> (raw)

A bugfix accidentally changed one line to return the peer_addr
from setup_header, causing it to become unused:

net/bluetooth/6lowpan.c: In function 'setup_header':
net/bluetooth/6lowpan.c:402:14: error: parameter 'peer_addr' set but not used [-Werror=unused-but-set-parameter]

The only user of the variable is a subsequent printk(), and
it is not otherwise initialized, so reverting the changed line
looks like the right fix.

Fixes: fb6f2f606ce8 ("6lowpan: Fix IID format for Bluetooth")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 net/bluetooth/6lowpan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c
index 24348c8579dd..ba28c7b1557f 100644
--- a/net/bluetooth/6lowpan.c
+++ b/net/bluetooth/6lowpan.c
@@ -432,7 +432,7 @@ static int setup_header(struct sk_buff *skb, struct net_device *netdev,
 		}
 
 		daddr = peer->lladdr;
-		peer_addr = &peer->chan->dst;
+		*peer_addr = peer->chan->dst;
 		*peer_addr_type = peer->chan->dst_type;
 		lowpan_cb(skb)->chan = peer->chan;
 
-- 
2.9.0

             reply	other threads:[~2017-03-28 13:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-28 13:29 Arnd Bergmann [this message]
2017-03-28 13:37 ` [PATCH] 6lowpan: set peer_addr correctly again Marcel Holtmann
2017-03-28 13:42   ` Von Dentz, Luiz

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=20170328132935.382216-1-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=aar@pengutronix.de \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=glennrubenbakke@nordicsemi.no \
    --cc=gustavo@padovan.org \
    --cc=johan.hedberg@gmail.com \
    --cc=jukka.rissanen@linux.intel.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luiz.von.dentz@intel.com \
    --cc=marcel@holtmann.org \
    --cc=netdev@vger.kernel.org \
    --cc=patrik.flykt@linux.intel.com \
    --cc=stefan@osg.samsung.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