All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Aring <alex.aring@gmail.com>
To: linux-wpan@vger.kernel.org
Cc: linux-bluetooth@vger.kernel.org, kernel@pengutronix.de,
	Alexander Aring <alex.aring@gmail.com>
Subject: [PATCH bluetooth-next 2/2] 6lowpan: iphc: remove handling when dam is zero
Date: Tue, 17 Nov 2015 19:54:01 +0100	[thread overview]
Message-ID: <1447786441-17845-3-git-send-email-alex.aring@gmail.com> (raw)
In-Reply-To: <1447786441-17845-1-git-send-email-alex.aring@gmail.com>

This patch removes handling of LOWPAN_IPHC_DAM_00 inside the
lowpan_compress_addr_64 function. The case of LOWPAN_IPHC_DAM_00 can
never occur. there exists a if branch which use LOWPAN_IPHC_DAM_11 and
LOWPAN_IPHC_DAM_10 and inside the else branch LOWPAN_IPHC_DAM_01. So
LOWPAN_IPHC_DAM_00 can never occur.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
 net/6lowpan/iphc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/6lowpan/iphc.c b/net/6lowpan/iphc.c
index 13f5424..f7f175c 100644
--- a/net/6lowpan/iphc.c
+++ b/net/6lowpan/iphc.c
@@ -594,7 +594,6 @@ int lowpan_header_decompress(struct sk_buff *skb, const struct net_device *dev,
 EXPORT_SYMBOL_GPL(lowpan_header_decompress);
 
 static const u8 lowpan_iphc_dam_to_sam_value[] = {
-	[LOWPAN_IPHC_DAM_00] = LOWPAN_IPHC_SAM_00,
 	[LOWPAN_IPHC_DAM_01] = LOWPAN_IPHC_SAM_01,
 	[LOWPAN_IPHC_DAM_10] = LOWPAN_IPHC_SAM_10,
 	[LOWPAN_IPHC_DAM_11] = LOWPAN_IPHC_SAM_11,
@@ -603,7 +602,7 @@ static const u8 lowpan_iphc_dam_to_sam_value[] = {
 static u8 lowpan_compress_addr_64(u8 **hc_ptr, const struct in6_addr *ipaddr,
 				  const unsigned char *lladdr, bool sam)
 {
-	u8 dam = LOWPAN_IPHC_DAM_00;
+	u8 dam;
 
 	if (is_addr_mac_addr_based(ipaddr, lladdr)) {
 		dam = LOWPAN_IPHC_DAM_11; /* 0-bits */
-- 
2.6.1


  parent reply	other threads:[~2015-11-17 18:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-17 18:53 [PATCH bluetooth-next 0/2] 6lowpan: iphc: cleanups Alexander Aring
2015-11-17 18:54 ` [PATCH bluetooth-next 1/2] 6lowpan: iphc: add check for reserved values Alexander Aring
2015-11-17 21:04   ` Stefan Schmidt
2015-11-17 18:54 ` Alexander Aring [this message]
2015-11-17 21:04   ` [PATCH bluetooth-next 2/2] 6lowpan: iphc: remove handling when dam is zero Stefan Schmidt
2015-11-25 13:23 ` [PATCH bluetooth-next 0/2] 6lowpan: iphc: cleanups Alexander Aring

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=1447786441-17845-3-git-send-email-alex.aring@gmail.com \
    --to=alex.aring@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-wpan@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.