[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.11.1407051818370.15455@eddie.linux-mips.org>
Date: Sat, 5 Jul 2014 18:29:35 +0100 (BST)
From: "Maciej W. Rozycki" <macro@...ux-mips.org>
To: Joe Perches <joe@...ches.com>
cc: netdev@...r.kernel.org
Subject: Re: [PATCH] defxx: Fix issues with debug printk calls
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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists