lkml.org 
[lkml]   [2014]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/5] usb: gadget: net2280: Use pr_* function
On Mon, 19 May 2014, Ricardo Ribalda Delgado wrote:

> Driver was using custom functions WARNING, ERROR, DEBUG, instead of
> pr_err, pr_dgb...

What's wrong with that, and why bother to change it?

> diff --git a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c
> index e67ae96..11800bb 100644
> --- a/drivers/usb/gadget/net2280.c
> +++ b/drivers/usb/gadget/net2280.c
> @@ -210,7 +210,7 @@ static int net2280_enable(struct usb_ep *_ep,
> * use it instead of troublesome (non-bulk) multi-packet DMA.
> */
> if (ep->dma && (max % 4) != 0 && use_dma_chaining) {
> - DEBUG(ep->dev, "%s, no dma for maxpacket %d\n",
> + dev_dbg(GETDEV(ep->dev), "%s, no dma for maxpacket %d\n",

Don't you think that the new code is harder to read than the original?
Why go to a lot of trouble just to make things worse?

Alan Stern



\
 
 \ /
  Last update: 2014-05-20 03:41    [W:0.099 / U:1.720 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site