netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steve Glendinning <steve.glendinning@smsc.com>
To: netdev@vger.kernel.org
Cc: Ian Saturley <ian.saturley@smsc.com>,
	David Brownell <dbrownell@users.sourceforge.net>,
	Jeff Garzik <jeff@garzik.org>,
	Steve Glendinning <steve.glendinning@smsc.com>
Subject: [PATCH 1/1] usbnet: allow type check of devdbg arguments in non-debug build
Date: Mon, 15 Sep 2008 16:47:44 +0100	[thread overview]
Message-ID: <1221493664-544-1-git-send-email-steve.glendinning@smsc.com> (raw)

improve usbnet's devdbg to always type-check diagnostic arguments,
like dev_dbg (device.h).  This makes no change to the resulting size of
usbnet modules.

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
---
 include/linux/usb/usbnet.h |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h
index ba09fe8..7d38222 100644
--- a/include/linux/usb/usbnet.h
+++ b/include/linux/usb/usbnet.h
@@ -197,7 +197,9 @@ extern int usbnet_nway_reset(struct net_device *net);
 #define devdbg(usbnet, fmt, arg...) \
 	printk(KERN_DEBUG "%s: " fmt "\n" , (usbnet)->net->name , ## arg)
 #else
-#define devdbg(usbnet, fmt, arg...) do {} while(0)
+#define devdbg(usbnet, fmt, arg...) \
+	({ if (0) printk(KERN_DEBUG "%s: " fmt "\n" , (usbnet)->net->name , \
+		## arg); 0; })
 #endif
 
 #define deverr(usbnet, fmt, arg...) \
-- 
1.5.5.1


             reply	other threads:[~2008-09-15 15:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-15 15:47 Steve Glendinning [this message]
2008-09-25  2:14 ` [PATCH 1/1] usbnet: allow type check of devdbg arguments in non-debug build Jeff Garzik
2009-01-17  7:19 ` [patch 2.6.29-rc] " David Brownell
2009-01-20  1:12   ` David Miller
2009-01-20  1:57     ` David Miller
2009-01-20  2:04       ` David Brownell
2009-01-20  4:08         ` David Miller
2009-01-20  5:11           ` David Brownell
2009-01-20 10:56             ` Steve.Glendinning
2009-01-20 17:19               ` David Miller

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=1221493664-544-1-git-send-email-steve.glendinning@smsc.com \
    --to=steve.glendinning@smsc.com \
    --cc=dbrownell@users.sourceforge.net \
    --cc=ian.saturley@smsc.com \
    --cc=jeff@garzik.org \
    --cc=netdev@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 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).