netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@linux-mips.org>
To: Joe Perches <joe@perches.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] defxx: Fix issues with debug printk calls
Date: Sat, 5 Jul 2014 18:29:35 +0100 (BST)	[thread overview]
Message-ID: <alpine.LFD.2.11.1407051818370.15455@eddie.linux-mips.org> (raw)
In-Reply-To: <1404578640.6384.49.camel@joe-AO725>

On Sat, 5 Jul 2014, Joe Perches wrote:

> > +++ linux-20140623-swarm64-eb/drivers/net/fddi/defxx.h
> > @@ -1693,7 +1693,7 @@ typedef union
> >  /* Only execute special print call when debug driver was built */
> >  
> >  #ifdef DEFXX_DEBUG
> > -#define DBG_printk(args...) printk(## args)
> > +#define DBG_printk(args...) printk(args)
> >  #else
> >  #define DBG_printk(args...)
> >  #endif
> 
> It'd be nicer to change this bit to
> 
> #ifdef DEFXX_DEBUG
> #define DBG_printk(fmt, ...)					\
> 	printk(KERN_DEBUG fmt, ##__VA_ARGS__)
> #else
> #define DBG_printk(fmt, ...) 					\
> 	do (if (0) printk(KERN_DEBUG fmt, ##__VA_ARGS__); } while (0)
> #endif
> 
> or just use pr_debug everywhere instead.

 I plan to overhaul this driver to use pr_* or dev_* printk interfaces 
(depending on which of the two I'll find appropriate), but not at this 
stage, here are only strict bug fixes and I don't want to mix bug fixes 
with code quality improvements, so that'd have to be a separate follow-up 
patch anyway (removing DEFXX_DEBUG at the same time as no longer needed).  
This change is at least obviously correct.

 Thanks for your input.

  Maciej

  reply	other threads:[~2014-07-05 17:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-05 14:28 [PATCH] defxx: Fix issues with debug printk calls Maciej W. Rozycki
2014-07-05 16:44 ` Joe Perches
2014-07-05 17:29   ` Maciej W. Rozycki [this message]
2014-07-08 22:32 ` 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=alpine.LFD.2.11.1407051818370.15455@eddie.linux-mips.org \
    --to=macro@linux-mips.org \
    --cc=joe@perches.com \
    --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).