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]
Date:	Tue, 15 May 2012 16:54:56 +0100
From:	Ian Abbott <abbotti@....co.uk>
To:	H Hartley Sweeten <hartleys@...ionengravers.com>
CC:	Ian Abbott <ian.abbott@....co.uk>,
	Linux Kernel <linux-kernel@...r.kernel.org>,
	"devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
	"fmhess@...rs.sourceforge.net" <fmhess@...rs.sourceforge.net>,
	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
Subject: Re: [PATCH] staging: comedi: refactor ni_pcimio driver and use module_comedi_pci_driver

On 2012-05-15 16:41, H Hartley Sweeten wrote:
> On Tuesday, May 15, 2012 4:29 AM, Ian Abbott wrote:
>> On 2012-05-12 00:51, H Hartley Sweeten wrote:
>>> +static struct comedi_driver ni_pcimio_driver = {
>>> +	.driver_name	= "ni_pcimio",
>>
>> The original used the DRV_NAME macro expanding to "ni_pcimio" here...
>>
>>> +static struct pci_driver ni_pcimio_pci_driver = {
>>> +	.name		= "ni_pcimio",
>>
>> ... which could also be used here.
>>
>>   (I realize this is a bit late as the patch is already committed!)
>
> I noticed that. A couple of the comedi drivers do this but it's not consistent.
>
> Personally I don't care for the use of the DRV_NAME (or DRIVER_NAME
> or whatever someone wants to call it) usage. It doesn't same any code
> space and always makes me have to do a second search to see what the
> "name" actually is.
>
> Regardsless, if you prefer this in the drivers please let me know. It
> would be nice to have them somewhat consistent before the comedi
> support leaves staging.

It doesn't really matter as long as it's consistent within the driver. 
I tend to use macros for literals used several times as it often allows 
mistakes to be caught at compile-time.

I think DRV_NAME is still used in the request_irq() call though.

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@....co.uk>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-
--
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