public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Shan Wei <shanwei88@gmail.com>
To: Greg KH <gregkh@linuxfoundation.org>,
	benchan@chromium.org, syahn@gctsemi.com,
	devel@driverdev.osuosl.org, pstew@chromium.org,
	devel@driverdev.osuosl.org, joe@perches.com
Cc: Kernel-Maillist <linux-kernel@vger.kernel.org>
Subject: [PATCH v3] drivers: staging: remove last usage of NIPQUAD and NIP6 in gdm72xx
Date: Tue, 27 Nov 2012 10:37:46 +0800	[thread overview]
Message-ID: <50B4277A.6080307@gmail.com> (raw)

From: Shan Wei <davidshan@tencent.com>

commit cf4ca4874fc45 removed the definition of NIPQUAD and NIPQUAD_FMT,
and NIP6 also is out of date.

Because DEBUG_SDU is not defined in gdm_wimax.h, no error message when compiling
this code. And remove constant condition judge.


Signed-off-by: Shan Wei <davidshan@tencent.com>
---
V3:
   As suggestion of greg k-h's patch email bot, recreate this patch base on greg's staging tree,
   v2 is on David Miller's net-next tree.
---
 drivers/staging/gdm72xx/gdm_wimax.c |   10 +---------
 1 files changed, 1 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/gdm72xx/gdm_wimax.c b/drivers/staging/gdm72xx/gdm_wimax.c
index 6cb8107..c0ec4d0 100644
--- a/drivers/staging/gdm72xx/gdm_wimax.c
+++ b/drivers/staging/gdm72xx/gdm_wimax.c
@@ -166,21 +166,13 @@ static void dump_eth_packet(const char *title, u8 *data, int len)
 		get_ip_protocol_name(ip_protocol),
 		get_port_name(port));
 
-	#if 1
 	if (!(data[0] == 0xff && data[1] == 0xff)) {
 		if (protocol == ETH_P_IP) {
-			printk(KERN_DEBUG "     src=%u.%u.%u.%u\n",
-				NIPQUAD(ih->saddr));
+			printk(KERN_DEBUG "     src=%pI4\n", &ih->saddr);
 		} else if (protocol == ETH_P_IPV6) {
-			#ifdef NIP6
-			printk(KERN_DEBUG "     src=%x:%x:%x:%x:%x:%x:%x:%x\n",
-				NIP6(ih->saddr));
-			#else
 			printk(KERN_DEBUG "     src=%pI6\n", &ih->saddr);
-			#endif
 		}
 	}
-	#endif
 
 	#if (DUMP_PACKET & DUMP_SDU_ALL)
 	printk_hex(data, len);
-- 
1.7.1


             reply	other threads:[~2012-11-27  2:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-27  2:37 Shan Wei [this message]
2012-11-27 17:19 ` [PATCH v3] drivers: staging: remove last usage of NIPQUAD and NIP6 in gdm72xx Greg KH
2012-11-28  2:54   ` [PATCH v4] " Shan Wei

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=50B4277A.6080307@gmail.com \
    --to=shanwei88@gmail.com \
    --cc=benchan@chromium.org \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pstew@chromium.org \
    --cc=syahn@gctsemi.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