From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org, stern@rowland.harvard.edu,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ohci-pci: use PCI_DEVICE_SUB()
Date: Sat, 17 Oct 2015 15:17:07 +0300 [thread overview]
Message-ID: <56223C43.3030009@cogentembedded.com> (raw)
In-Reply-To: <20151017063942.GA14187@kroah.com>
On 10/17/2015 9:39 AM, Greg KH wrote:
>> Toshiba Portege 4000 quirk entry can be written shorter using the
>> PCI_DEVICE_SUB() macro.
>>
>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>>
>> ---
>> The patch is against the 'usb-next' branch of Greg KH's 'usb.git' repo.
>>
>> drivers/usb/host/ohci-pci.c | 6 ++----
>> 1 file changed, 2 insertions(+), 4 deletions(-)
>>
>> Index: usb/drivers/usb/host/ohci-pci.c
>> ===================================================================
>> --- usb.orig/drivers/usb/host/ohci-pci.c
>> +++ usb/drivers/usb/host/ohci-pci.c
>> @@ -192,10 +192,8 @@ static const struct pci_device_id ohci_p
>> },
>> {
>> /* Toshiba portege 4000 */
>> - .vendor = PCI_VENDOR_ID_AL,
>> - .device = 0x5237,
>> - .subvendor = PCI_VENDOR_ID_TOSHIBA,
>> - .subdevice = 0x0004,
>> + PCI_DEVICE_SUB(PCI_VENDOR_ID_AL, 0x5237,
>> + PCI_VENDOR_ID_TOSHIBA, 0x0004),
>
> But it's much less readable now, right?
To me, the field names like sub{vendor|device} also don't seem very
readable, I'd prefer subsys_{vendor|device}. Does your logic extend to using
the mere USB_DEVICE() macro too?
> Why make this change then?
For brevity's sake. The same reason they called the fields sub{vendor|device}.
> sorry,
>
> greg k-h
MBR, Sergei
prev parent reply other threads:[~2015-10-17 12:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-12 17:31 [PATCH] ohci-pci: use PCI_DEVICE_SUB() Sergei Shtylyov
2015-10-17 6:39 ` Greg KH
2015-10-17 12:17 ` Sergei Shtylyov [this message]
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=56223C43.3030009@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/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;
as well as URLs for NNTP newsgroup(s).