lkml.org 
[lkml]   [2014]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 5/5] usb: gadget: net2280: Use pr_* function
From
Date
On Mon, 2014-05-19 at 16:17 -0400, Alan Stern wrote:
> On Mon, 19 May 2014, Ricardo Ribalda Delgado wrote:
> > I really think that setting/unsetting DEBUG and VERBOSE is not a good
> > idea, and the generic functions are there to be used.
> You could change the definitions of DEBUG and VDEBUG to make them use
> the generic functions.
> > What do you think that makes it more difficult to read? The GETDEV macro?

Maybe add ep_<level> helper macros and remove xprint

#define ep_err(ep, fmt, ...) \
dev_err(&(ep)->dev->pdev->dev, fmt, ##__VA_ARGS__)
#define ep_warn(ep, fmt, ...) \
dev_warn(&(ep)->dev->pdev->dev, fmt, ##__VA_ARGS__)
#define ep_info(ep, fmt, ...) \
dev_info(&(ep)->dev->pdev->dev, fmt, ##__VA_ARGS__)
#define ep_dbg(ep, fmt, ...) \
dev_dbg(&(ep)->dev->pdev->dev, fmt, ##__VA_ARGS__)
#define ep_vdbg(ep, fmt, ...) \
dev_vdbg(&(ep)->dev->pdev->dev, fmt, ##__VA_ARGS__)

but even that conversion isn't straightforward.




\
 
 \ /
  Last update: 2014-05-22 13:21    [W:0.052 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site