lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPybu_1LLg4LEPdS2iN0qY=AYJmCiJOr6EhpR9Kn0Rn2H2dpOg@mail.gmail.com>
Date:	Mon, 19 May 2014 22:03:48 +0200
From:	Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>
To:	Alan Stern <stern@...land.harvard.edu>
Cc:	"balbi@...com" <balbi@...com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Linux USB Mailing List <linux-usb@...r.kernel.org>,
	Joe Perches <joe@...ches.com>,
	Amit Uttamchandani <auttamchandani@...icube.com>
Subject: Re: [PATCH 5/5] usb: gadget: net2280: Use pr_* function

Hello Alan

I really think that setting/unsetting DEBUG and VERBOSE is not a good
idea, and the generic functions are there to be used.

What do you think that makes it more difficult to read? The GETDEV macro?

Cheers

On Mon, May 19, 2014 at 9:44 PM, Alan Stern <stern@...land.harvard.edu> wrote:
> 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
>



-- 
Ricardo Ribalda
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ