From: Ian Abbott <abbotti@mev.co.uk>
To: H Hartley Sweeten <hartleys@visionengravers.com>
Cc: Ian Abbott <ian.abbott@mev.co.uk>,
Linux Kernel <linux-kernel@vger.kernel.org>,
"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
"fmhess@users.sourceforge.net" <fmhess@users.sourceforge.net>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Subject: Re: [PATCH] staging: comedi: refactor ni_pcimio driver and use module_comedi_pci_driver
Date: Tue, 15 May 2012 16:54:56 +0100 [thread overview]
Message-ID: <4FB27C50.2000609@mev.co.uk> (raw)
In-Reply-To: <ADE657CA350FB648AAC2C43247A983F0020698AE0932@AUSP01VMBX24.collaborationhost.net>
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@mev.co.uk> )=-
-=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-
next prev parent reply other threads:[~2012-05-15 15:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-11 23:51 [PATCH] staging: comedi: refactor ni_pcimio driver and use module_comedi_pci_driver H Hartley Sweeten
2012-05-15 11:28 ` Ian Abbott
2012-05-15 15:41 ` H Hartley Sweeten
2012-05-15 15:54 ` Ian Abbott [this message]
2012-05-15 16:11 ` H Hartley Sweeten
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FB27C50.2000609@mev.co.uk \
--to=abbotti@mev.co.uk \
--cc=devel@driverdev.osuosl.org \
--cc=fmhess@users.sourceforge.net \
--cc=gregkh@linuxfoundation.org \
--cc=hartleys@visionengravers.com \
--cc=ian.abbott@mev.co.uk \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox