netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: Steve Glendinning <steve.glendinning@smsc.com>
Cc: netdev@vger.kernel.org, Ian Saturley <ian.saturley@smsc.com>,
	David Brownell <dbrownell@users.sourceforge.net>
Subject: Re: [PATCH 1/1] usbnet: allow type check of devdbg arguments in non-debug build
Date: Wed, 24 Sep 2008 22:14:45 -0400	[thread overview]
Message-ID: <48DAF415.8000307@garzik.org> (raw)
In-Reply-To: <1221493664-544-1-git-send-email-steve.glendinning@smsc.com>

Steve Glendinning wrote:
> 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

applied



  reply	other threads:[~2008-09-25  2:14 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 [this message]
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=48DAF415.8000307@garzik.org \
    --to=jeff@garzik.org \
    --cc=dbrownell@users.sourceforge.net \
    --cc=ian.saturley@smsc.com \
    --cc=netdev@vger.kernel.org \
    --cc=steve.glendinning@smsc.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;
as well as URLs for NNTP newsgroup(s).