public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell•net>
To: netdev@vger•kernel.org
Cc: Steve Glendinning <steve.glendinning@smsc•com>,
	Ian Saturley <ian.saturley@smsc•com>,
	Jeff Garzik <jeff@garzik•org>
Subject: [patch 2.6.29-rc] usbnet: allow type check of devdbg arguments in non-debug build
Date: Fri, 16 Jan 2009 23:19:44 -0800	[thread overview]
Message-ID: <200901162319.44255.david-b@pacbell.net> (raw)
In-Reply-To: <1221493664-544-1-git-send-email-steve.glendinning@smsc.com>

From: Steve Glendinning <steve.glendinning@smsc•com>
Subject: usbnet: allow type check of devdbg arguments in non-debug build

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>
Signed-off-by: David Brownell <dbrownell@users•sourceforge.net>
---
[ refreshed against 2.6.29-rc1 GIT ]

 include/linux/usb/usbnet.h |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/include/linux/usb/usbnet.h
+++ b/include/linux/usb/usbnet.h
@@ -197,7 +197,9 @@ extern int usbnet_nway_reset(struct 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...) \

  parent reply	other threads:[~2009-01-17  7:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-15 15:47 [PATCH 1/1] usbnet: allow type check of devdbg arguments in non-debug build Steve Glendinning
2008-09-25  2:14 ` Jeff Garzik
2009-01-17  7:19 ` David Brownell [this message]
2009-01-20  1:12   ` [patch 2.6.29-rc] " 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=200901162319.44255.david-b@pacbell.net \
    --to=david-b@pacbell$(echo .)net \
    --cc=ian.saturley@smsc$(echo .)com \
    --cc=jeff@garzik$(echo .)org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=steve.glendinning@smsc$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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