Re: [RFC v3 10/11] usb: gadget: ci13xxx: replace home-brewed logging with dev_{err,warn,info}

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Hi,

On Tue, Apr 17, 2012 at 03:35:27PM +0300, Alexander Shishkin wrote:
>  #ifdef TRACE
> -#define trace(format, args...)      ci13xxx_printk(KERN_DEBUG, format, ## args)
> -#define dbg_trace(format, args...)  dev_dbg(dev, format, ##args)
> +#define ci13xxx_printk(dev, format, args...)				\
> +	do {								\
> +		if (dev == NULL)					\
> +			pr_debug("[%s] " format "\n", __func__,		\
> +			       ## args);				\
> +		else							\
> +			dev_printk(KERN_DEBUG, dev, "[%s] " format "\n", \
> +				   __func__, ## args);			\
> +	} while (0)
>  #else
> -#define trace(format, args...)      do {} while (0)
> -#define dbg_trace(format, args...)  do {} while (0)
> +#define trace(dev, format, args...)      do {} while (0)
>  #endif

unless my eyes are failing me, but it looks that trace is only defined
when !TRACE, is that right ?

-- 
balbi

Attachment: signature.asc
Description: Digital signature


B and H Foto and Electronics Corp.

[Linux Media]     [Video for Linux]     [Linux Input]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Free Online Dating]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]     [More Archives]

Add to Google Powered by Linux