From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752837AbbJQMRM (ORCPT ); Sat, 17 Oct 2015 08:17:12 -0400 Received: from mail-lb0-f172.google.com ([209.85.217.172]:35444 "EHLO mail-lb0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752308AbbJQMRK (ORCPT ); Sat, 17 Oct 2015 08:17:10 -0400 Subject: Re: [PATCH] ohci-pci: use PCI_DEVICE_SUB() To: Greg KH References: <1541327.LNxLmfJ8uG@wasted.cogentembedded.com> <20151017063942.GA14187@kroah.com> Cc: linux-usb@vger.kernel.org, stern@rowland.harvard.edu, linux-kernel@vger.kernel.org From: Sergei Shtylyov Message-ID: <56223C43.3030009@cogentembedded.com> Date: Sat, 17 Oct 2015 15:17:07 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151017063942.GA14187@kroah.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >> >> --- >> 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