* [PATCH 0/2] PCI: Make use of PCI_DEVICE_XXX() helper function @ 2021-07-22 11:29 Cai Huoqing 2021-07-22 11:29 ` [PATCH 1/2] PCI: Make use of PCI_DEVICE_SUB/_CLASS() " Cai Huoqing 2021-07-22 11:29 ` [PATCH 2/2] PCI: vmd: Make use of PCI_DEVICE_DATA() " Cai Huoqing 0 siblings, 2 replies; 10+ messages in thread From: Cai Huoqing @ 2021-07-22 11:29 UTC (permalink / raw) To: jonathan.derrick; +Cc: linux-pci, linux-kernel, Cai Huoqing Could make use of PCI_DEVICE_XXX() helper function Cai Huoqing (2): PCI: Make use of PCI_DEVICE_SUB/_CLASS() helper function PCI: vmd: Make use of PCI_DEVICE_DATA() helper function drivers/pci/controller/vmd.c | 38 +++++++++++++++---------------- drivers/pci/hotplug/cpqphp_core.c | 13 ++--------- drivers/pci/search.c | 14 ++---------- include/linux/pci_ids.h | 2 ++ 4 files changed, 25 insertions(+), 42 deletions(-) -- 2.25.1 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/2] PCI: Make use of PCI_DEVICE_SUB/_CLASS() helper function 2021-07-22 11:29 [PATCH 0/2] PCI: Make use of PCI_DEVICE_XXX() helper function Cai Huoqing @ 2021-07-22 11:29 ` Cai Huoqing 2021-07-22 11:29 ` [PATCH 2/2] PCI: vmd: Make use of PCI_DEVICE_DATA() " Cai Huoqing 1 sibling, 0 replies; 10+ messages in thread From: Cai Huoqing @ 2021-07-22 11:29 UTC (permalink / raw) To: jonathan.derrick; +Cc: linux-pci, linux-kernel, Cai Huoqing We could make use of PCI_DEVICE_SUB/CLASS() helper function Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> --- drivers/pci/hotplug/cpqphp_core.c | 13 ++----------- drivers/pci/search.c | 14 ++------------ 2 files changed, 4 insertions(+), 23 deletions(-) diff --git a/drivers/pci/hotplug/cpqphp_core.c b/drivers/pci/hotplug/cpqphp_core.c index f99a7927e5a8..407206a233c8 100644 --- a/drivers/pci/hotplug/cpqphp_core.c +++ b/drivers/pci/hotplug/cpqphp_core.c @@ -1357,18 +1357,9 @@ static void __exit unload_cpqphpd(void) } static const struct pci_device_id hpcd_pci_tbl[] = { - { /* handle any PCI Hotplug controller */ - .class = ((PCI_CLASS_SYSTEM_PCI_HOTPLUG << 8) | 0x00), - .class_mask = ~0, - - /* no matter who makes it */ - .vendor = PCI_ANY_ID, - .device = PCI_ANY_ID, - .subvendor = PCI_ANY_ID, - .subdevice = PCI_ANY_ID, - - }, { /* end: all zeroes */ } + { PCI_DEVICE_CLASS(((PCI_CLASS_SYSTEM_PCI_HOTPLUG << 8) | 0x00), ~0) }, + { /* end: all zeroes */ }, }; MODULE_DEVICE_TABLE(pci, hpcd_pci_tbl); diff --git a/drivers/pci/search.c b/drivers/pci/search.c index b4c138a6ec02..528c4fe33171 100644 --- a/drivers/pci/search.c +++ b/drivers/pci/search.c @@ -303,11 +303,7 @@ struct pci_dev *pci_get_subsys(unsigned int vendor, unsigned int device, struct pci_dev *from) { struct pci_device_id id = { - .vendor = vendor, - .device = device, - .subvendor = ss_vendor, - .subdevice = ss_device, - }; + PCI_DEVICE_SUB(vendor, device, ss_vendor, ss_device) }; return pci_get_dev_by_id(&id, from); } @@ -351,13 +347,7 @@ EXPORT_SYMBOL(pci_get_device); struct pci_dev *pci_get_class(unsigned int class, struct pci_dev *from) { struct pci_device_id id = { - .vendor = PCI_ANY_ID, - .device = PCI_ANY_ID, - .subvendor = PCI_ANY_ID, - .subdevice = PCI_ANY_ID, - .class_mask = PCI_ANY_ID, - .class = class, - }; + PCI_DEVICE_CLASS(PCI_ANY_ID, class) }; return pci_get_dev_by_id(&id, from); } -- 2.25.1 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/2] PCI: vmd: Make use of PCI_DEVICE_DATA() helper function 2021-07-22 11:29 [PATCH 0/2] PCI: Make use of PCI_DEVICE_XXX() helper function Cai Huoqing 2021-07-22 11:29 ` [PATCH 1/2] PCI: Make use of PCI_DEVICE_SUB/_CLASS() " Cai Huoqing @ 2021-07-22 11:29 ` Cai Huoqing 2021-07-22 16:45 ` Derrick, Jonathan 1 sibling, 1 reply; 10+ messages in thread From: Cai Huoqing @ 2021-07-22 11:29 UTC (permalink / raw) To: jonathan.derrick; +Cc: linux-pci, linux-kernel, Cai Huoqing We could make use of PCI_DEVICE_DATA() helper function Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> --- drivers/pci/controller/vmd.c | 38 ++++++++++++++++++------------------ include/linux/pci_ids.h | 2 ++ 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c index e3fcdfec58b3..565681ed00a1 100644 --- a/drivers/pci/controller/vmd.c +++ b/drivers/pci/controller/vmd.c @@ -859,25 +859,25 @@ static int vmd_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(vmd_dev_pm_ops, vmd_suspend, vmd_resume); static const struct pci_device_id vmd_ids[] = { - {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_VMD_201D), - .driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP,}, - {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_VMD_28C0), - .driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW | - VMD_FEAT_HAS_BUS_RESTRICTIONS | - VMD_FEAT_CAN_BYPASS_MSI_REMAP,}, - {PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x467f), - .driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | - VMD_FEAT_HAS_BUS_RESTRICTIONS | - VMD_FEAT_OFFSET_FIRST_VECTOR,}, - {PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4c3d), - .driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | - VMD_FEAT_HAS_BUS_RESTRICTIONS | - VMD_FEAT_OFFSET_FIRST_VECTOR,}, - {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_VMD_9A0B), - .driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | - VMD_FEAT_HAS_BUS_RESTRICTIONS | - VMD_FEAT_OFFSET_FIRST_VECTOR,}, - {0,} + { PCI_DEVICE_DATA(INTEL, VMD_201D, + VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP) }, + { PCI_DEVICE_DATA(INTEL, VMD_28C0, + VMD_FEAT_HAS_MEMBAR_SHADOW | + VMD_FEAT_HAS_BUS_RESTRICTIONS | + VMD_FEAT_CAN_BYPASS_MSI_REMAP) }, + { PCI_DEVICE_DATA(INTEL, VMD_467F, + VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | + VMD_FEAT_HAS_BUS_RESTRICTIONS | + VMD_FEAT_OFFSET_FIRST_VECTOR) }, + { PCI_DEVICE_DATA(INTEL, VMD_4C3D, + VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | + VMD_FEAT_HAS_BUS_RESTRICTIONS | + VMD_FEAT_OFFSET_FIRST_VECTOR) }, + { PCI_DEVICE_DATA(INTEL, VMD_9A0B, + VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | + VMD_FEAT_HAS_BUS_RESTRICTIONS | + VMD_FEAT_OFFSET_FIRST_VECTOR) }, + { }, }; MODULE_DEVICE_TABLE(pci, vmd_ids); diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 4bac1831de80..d25552b5ae3e 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -2954,6 +2954,8 @@ #define PCI_DEVICE_ID_INTEL_SBRIDGE_BR 0x3cf5 /* 13.6 */ #define PCI_DEVICE_ID_INTEL_SBRIDGE_SAD1 0x3cf6 /* 12.7 */ #define PCI_DEVICE_ID_INTEL_IOAT_SNB 0x402f +#define PCI_DEVICE_ID_INTEL_VMD_467F 0x467f +#define PCI_DEVICE_ID_INTEL_VMD_4C3D 0x4c3d #define PCI_DEVICE_ID_INTEL_5100_16 0x65f0 #define PCI_DEVICE_ID_INTEL_5100_19 0x65f3 #define PCI_DEVICE_ID_INTEL_5100_21 0x65f5 -- 2.25.1 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] PCI: vmd: Make use of PCI_DEVICE_DATA() helper function 2021-07-22 11:29 ` [PATCH 2/2] PCI: vmd: Make use of PCI_DEVICE_DATA() " Cai Huoqing @ 2021-07-22 16:45 ` Derrick, Jonathan 2021-07-23 1:34 ` Cai,Huoqing 0 siblings, 1 reply; 10+ messages in thread From: Derrick, Jonathan @ 2021-07-22 16:45 UTC (permalink / raw) To: Cai Huoqing; +Cc: linux-pci, linux-kernel Hello, On 7/22/2021 5:29 AM, Cai Huoqing wrote: > We could make use of PCI_DEVICE_DATA() helper function > > Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> > --- > drivers/pci/controller/vmd.c | 38 ++++++++++++++++++------------------ > include/linux/pci_ids.h | 2 ++ > 2 files changed, 21 insertions(+), 19 deletions(-) > > diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c > index e3fcdfec58b3..565681ed00a1 100644 > --- a/drivers/pci/controller/vmd.c > +++ b/drivers/pci/controller/vmd.c > @@ -859,25 +859,25 @@ static int vmd_resume(struct device *dev) > static SIMPLE_DEV_PM_OPS(vmd_dev_pm_ops, vmd_suspend, vmd_resume); > > static const struct pci_device_id vmd_ids[] = { > - {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_VMD_201D), > - .driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP,}, > - {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_VMD_28C0), > - .driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW | > - VMD_FEAT_HAS_BUS_RESTRICTIONS | > - VMD_FEAT_CAN_BYPASS_MSI_REMAP,}, > - {PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x467f), > - .driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | > - VMD_FEAT_HAS_BUS_RESTRICTIONS | > - VMD_FEAT_OFFSET_FIRST_VECTOR,}, > - {PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4c3d), > - .driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | > - VMD_FEAT_HAS_BUS_RESTRICTIONS | > - VMD_FEAT_OFFSET_FIRST_VECTOR,}, > - {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_VMD_9A0B), > - .driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | > - VMD_FEAT_HAS_BUS_RESTRICTIONS | > - VMD_FEAT_OFFSET_FIRST_VECTOR,}, > - {0,} > + { PCI_DEVICE_DATA(INTEL, VMD_201D, > + VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP) }, > + { PCI_DEVICE_DATA(INTEL, VMD_28C0, > + VMD_FEAT_HAS_MEMBAR_SHADOW | > + VMD_FEAT_HAS_BUS_RESTRICTIONS | > + VMD_FEAT_CAN_BYPASS_MSI_REMAP) }, > + { PCI_DEVICE_DATA(INTEL, VMD_467F, > + VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | > + VMD_FEAT_HAS_BUS_RESTRICTIONS | > + VMD_FEAT_OFFSET_FIRST_VECTOR) }, > + { PCI_DEVICE_DATA(INTEL, VMD_4C3D, > + VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | > + VMD_FEAT_HAS_BUS_RESTRICTIONS | > + VMD_FEAT_OFFSET_FIRST_VECTOR) }, > + { PCI_DEVICE_DATA(INTEL, VMD_9A0B, > + VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | > + VMD_FEAT_HAS_BUS_RESTRICTIONS | > + VMD_FEAT_OFFSET_FIRST_VECTOR) }, > + { }, > }; > MODULE_DEVICE_TABLE(pci, vmd_ids); > > diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h > index 4bac1831de80..d25552b5ae3e 100644 > --- a/include/linux/pci_ids.h > +++ b/include/linux/pci_ids.h > @@ -2954,6 +2954,8 @@ > #define PCI_DEVICE_ID_INTEL_SBRIDGE_BR 0x3cf5 /* 13.6 */ > #define PCI_DEVICE_ID_INTEL_SBRIDGE_SAD1 0x3cf6 /* 12.7 */ > #define PCI_DEVICE_ID_INTEL_IOAT_SNB 0x402f > +#define PCI_DEVICE_ID_INTEL_VMD_467F 0x467f > +#define PCI_DEVICE_ID_INTEL_VMD_4C3D 0x4c3d > #define PCI_DEVICE_ID_INTEL_5100_16 0x65f0 > #define PCI_DEVICE_ID_INTEL_5100_19 0x65f3 > #define PCI_DEVICE_ID_INTEL_5100_21 0x65f5 > This is fine with me Reviewed-by: Jon Derrick <jonathan.derrick@intel.com> ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH 2/2] PCI: vmd: Make use of PCI_DEVICE_DATA() helper function 2021-07-22 16:45 ` Derrick, Jonathan @ 2021-07-23 1:34 ` Cai,Huoqing 2021-07-23 2:00 ` Krzysztof Wilczyński 0 siblings, 1 reply; 10+ messages in thread From: Cai,Huoqing @ 2021-07-23 1:34 UTC (permalink / raw) To: Derrick, Jonathan; +Cc: linux-pci, linux-kernel Hello, PATCH[2/2] has some extra indentation, please don't apply it , I'll send PATCH V2. THX -----Original Message----- From: Derrick, Jonathan <jonathan.derrick@intel.com> Sent: 2021年7月23日 0:46 To: Cai,Huoqing <caihuoqing@baidu.com> Cc: linux-pci@vger.kernel.org; linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] PCI: vmd: Make use of PCI_DEVICE_DATA() helper function Hello, On 7/22/2021 5:29 AM, Cai Huoqing wrote: > We could make use of PCI_DEVICE_DATA() helper function > > Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> > --- > drivers/pci/controller/vmd.c | 38 ++++++++++++++++++------------------ > include/linux/pci_ids.h | 2 ++ > 2 files changed, 21 insertions(+), 19 deletions(-) > > diff --git a/drivers/pci/controller/vmd.c > b/drivers/pci/controller/vmd.c index e3fcdfec58b3..565681ed00a1 100644 > --- a/drivers/pci/controller/vmd.c > +++ b/drivers/pci/controller/vmd.c > @@ -859,25 +859,25 @@ static int vmd_resume(struct device *dev) > static SIMPLE_DEV_PM_OPS(vmd_dev_pm_ops, vmd_suspend, vmd_resume); > > static const struct pci_device_id vmd_ids[] = { > - {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_VMD_201D), > - .driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP,}, > - {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_VMD_28C0), > - .driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW | > - VMD_FEAT_HAS_BUS_RESTRICTIONS | > - VMD_FEAT_CAN_BYPASS_MSI_REMAP,}, > - {PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x467f), > - .driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | > - VMD_FEAT_HAS_BUS_RESTRICTIONS | > - VMD_FEAT_OFFSET_FIRST_VECTOR,}, > - {PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4c3d), > - .driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | > - VMD_FEAT_HAS_BUS_RESTRICTIONS | > - VMD_FEAT_OFFSET_FIRST_VECTOR,}, > - {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_VMD_9A0B), > - .driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | > - VMD_FEAT_HAS_BUS_RESTRICTIONS | > - VMD_FEAT_OFFSET_FIRST_VECTOR,}, > - {0,} > + { PCI_DEVICE_DATA(INTEL, VMD_201D, > + VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP) }, > + { PCI_DEVICE_DATA(INTEL, VMD_28C0, > + VMD_FEAT_HAS_MEMBAR_SHADOW | > + VMD_FEAT_HAS_BUS_RESTRICTIONS | > + VMD_FEAT_CAN_BYPASS_MSI_REMAP) }, > + { PCI_DEVICE_DATA(INTEL, VMD_467F, > + VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | > + VMD_FEAT_HAS_BUS_RESTRICTIONS | > + VMD_FEAT_OFFSET_FIRST_VECTOR) }, > + { PCI_DEVICE_DATA(INTEL, VMD_4C3D, > + VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | > + VMD_FEAT_HAS_BUS_RESTRICTIONS | > + VMD_FEAT_OFFSET_FIRST_VECTOR) }, > + { PCI_DEVICE_DATA(INTEL, VMD_9A0B, > + VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | > + VMD_FEAT_HAS_BUS_RESTRICTIONS | > + VMD_FEAT_OFFSET_FIRST_VECTOR) }, > + { }, > }; > MODULE_DEVICE_TABLE(pci, vmd_ids); > > diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index > 4bac1831de80..d25552b5ae3e 100644 > --- a/include/linux/pci_ids.h > +++ b/include/linux/pci_ids.h > @@ -2954,6 +2954,8 @@ > #define PCI_DEVICE_ID_INTEL_SBRIDGE_BR 0x3cf5 /* 13.6 */ > #define PCI_DEVICE_ID_INTEL_SBRIDGE_SAD1 0x3cf6 /* 12.7 */ > #define PCI_DEVICE_ID_INTEL_IOAT_SNB 0x402f > +#define PCI_DEVICE_ID_INTEL_VMD_467F 0x467f > +#define PCI_DEVICE_ID_INTEL_VMD_4C3D 0x4c3d > #define PCI_DEVICE_ID_INTEL_5100_16 0x65f0 > #define PCI_DEVICE_ID_INTEL_5100_19 0x65f3 > #define PCI_DEVICE_ID_INTEL_5100_21 0x65f5 > This is fine with me Reviewed-by: Jon Derrick <jonathan.derrick@intel.com> ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] PCI: vmd: Make use of PCI_DEVICE_DATA() helper function 2021-07-23 1:34 ` Cai,Huoqing @ 2021-07-23 2:00 ` Krzysztof Wilczyński 2021-07-23 3:28 ` Cai,Huoqing 0 siblings, 1 reply; 10+ messages in thread From: Krzysztof Wilczyński @ 2021-07-23 2:00 UTC (permalink / raw) To: Cai,Huoqing; +Cc: Derrick, Jonathan, linux-pci, linux-kernel Hi, Thank you for sending the patch over! > PATCH[2/2] has some extra indentation, please don't apply it , You might know this already, but just in case make sure to run the "checkpatch.pl" script over the patch before submission. > I'll send PATCH V2. You mean v3? Make sure to include a changelog, if possible. A small nitpick: the PCI_DEVICE_DATA() is technically a macro rather than a function, so you could update both the subject line and the commit message accordingly, if you want. Also, since you are about to send another version, add period at the end of the sentence in the commit message. Aside of the above, it's a nice refactor, thank you! Krzysztof ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH 2/2] PCI: vmd: Make use of PCI_DEVICE_DATA() helper function 2021-07-23 2:00 ` Krzysztof Wilczyński @ 2021-07-23 3:28 ` Cai,Huoqing 0 siblings, 0 replies; 10+ messages in thread From: Cai,Huoqing @ 2021-07-23 3:28 UTC (permalink / raw) To: Krzysztof Wilczyński; +Cc: Derrick, Jonathan, linux-pci, linux-kernel Hi, Thank for your suggestion, useful to me I will send PATCH v3 again with changelog : v1->v2: *fix extra indent which occurs git-apply error v2->v3: *update the subject line from "funtion" to "macro" *add changelog to commit message commit date: 7-23-2021 11:00 thx -----Original Message----- From: Krzysztof Wilczyński <kw@linux.com> Sent: 2021年7月23日 10:00 To: Cai,Huoqing <caihuoqing@baidu.com> Cc: Derrick, Jonathan <jonathan.derrick@intel.com>; linux-pci@vger.kernel.org; linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] PCI: vmd: Make use of PCI_DEVICE_DATA() helper function Hi, Thank you for sending the patch over! > PATCH[2/2] has some extra indentation, please don't apply it , You might know this already, but just in case make sure to run the "checkpatch.pl" script over the patch before submission. > I'll send PATCH V2. You mean v3? Make sure to include a changelog, if possible. A small nitpick: the PCI_DEVICE_DATA() is technically a macro rather than a function, so you could update both the subject line and the commit message accordingly, if you want. Also, since you are about to send another version, add period at the end of the sentence in the commit message. Aside of the above, it's a nice refactor, thank you! Krzysztof ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 0/2] PCI: Make use of PCI_DEVICE_XXX() helper function @ 2021-07-22 11:19 Cai Huoqing 2021-07-22 16:52 ` Bjorn Helgaas 0 siblings, 1 reply; 10+ messages in thread From: Cai Huoqing @ 2021-07-22 11:19 UTC (permalink / raw) To: bhelgaas, jonathan.derrick, kw, onathan.derrick, lorenzo.pieralisi, robh Cc: linux-pci, linux-kernel, Cai Huoqing Could make use of PCI_DEVICE_XXX() helper function Cai Huoqing (2): PCI: Make use of PCI_DEVICE_SUB/_CLASS() helper function PCI: vmd: Make use of PCI_DEVICE_DATA() helper function drivers/pci/controller/vmd.c | 38 +++++++++++++++---------------- drivers/pci/hotplug/cpqphp_core.c | 13 ++--------- drivers/pci/search.c | 14 ++---------- include/linux/pci_ids.h | 2 ++ 4 files changed, 25 insertions(+), 42 deletions(-) -- 2.25.1 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/2] PCI: Make use of PCI_DEVICE_XXX() helper function 2021-07-22 11:19 [PATCH 0/2] PCI: Make use of PCI_DEVICE_XXX() " Cai Huoqing @ 2021-07-22 16:52 ` Bjorn Helgaas 2021-07-23 1:30 ` Cai,Huoqing 0 siblings, 1 reply; 10+ messages in thread From: Bjorn Helgaas @ 2021-07-22 16:52 UTC (permalink / raw) To: Cai Huoqing Cc: bhelgaas, jonathan.derrick, kw, onathan.derrick, lorenzo.pieralisi, robh, linux-pci, linux-kernel On Thu, Jul 22, 2021 at 07:19:01PM +0800, Cai Huoqing wrote: > Could make use of PCI_DEVICE_XXX() helper function > > Cai Huoqing (2): > PCI: Make use of PCI_DEVICE_SUB/_CLASS() helper function > PCI: vmd: Make use of PCI_DEVICE_DATA() helper function > > drivers/pci/controller/vmd.c | 38 +++++++++++++++---------------- > drivers/pci/hotplug/cpqphp_core.c | 13 ++--------- > drivers/pci/search.c | 14 ++---------- > include/linux/pci_ids.h | 2 ++ > 4 files changed, 25 insertions(+), 42 deletions(-) When you fix the problem below, also: s/Make use of/Use/ Update commit log to say what the patch does. See https://chris.beams.io/posts/git-commit/ for hints. Add period at end of sentences. I don't see exactly what's wrong, but this series doesn't apply cleanly. I'm using b4 to fetch the series. b4 is from https://git.kernel.org/pub/scm/utils/b4/b4.git 11:47:04 ~/linux (main)$ git checkout -b wip/cai v5.14-rc1 Switched to a new branch 'wip/cai' 11:47:17 ~/linux (wip/cai)$ b4 am -om/ 20210722111903.432-1-caihuoqing@baidu.com Looking up https://lore.kernel.org/r/20210722111903.432-1-caihuoqing%40baidu.com Grabbing thread from lore.kernel.org/linux-pci Analyzing 3 messages in the thread --- Writing m/20210722_caihuoqing_pci_make_use_of_pci_device_xxx_helper_function.mbx [PATCH 1/2] PCI: Make use of PCI_DEVICE_SUB/_CLASS() helper function [PATCH 2/2] PCI: vmd: Make use of PCI_DEVICE_DATA() helper function --- Total patches: 2 --- Cover: m/20210722_caihuoqing_pci_make_use_of_pci_device_xxx_helper_function.cover Link: https://lore.kernel.org/r/20210722111903.432-1-caihuoqing@baidu.com Base: not found (applies clean to current tree) git am m/20210722_caihuoqing_pci_make_use_of_pci_device_xxx_helper_function.mbx 11:47:45 ~/linux (wip/cai)$ git am m/20210722_caihuoqing_pci_make_use_of_pci_device_xxx_helper_function.mbx Applying: PCI: Make use of PCI_DEVICE_SUB/_CLASS() helper function error: patch failed: drivers/pci/hotplug/cpqphp_core.c:1357 error: drivers/pci/hotplug/cpqphp_core.c: patch does not apply error: patch failed: drivers/pci/search.c:303 error: drivers/pci/search.c: patch does not apply Patch failed at 0001 PCI: Make use of PCI_DEVICE_SUB/_CLASS() helper function hint: Use 'git am --show-current-patch' to see the failed patch When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH 0/2] PCI: Make use of PCI_DEVICE_XXX() helper function 2021-07-22 16:52 ` Bjorn Helgaas @ 2021-07-23 1:30 ` Cai,Huoqing 0 siblings, 0 replies; 10+ messages in thread From: Cai,Huoqing @ 2021-07-23 1:30 UTC (permalink / raw) To: Bjorn Helgaas Cc: bhelgaas, jonathan.derrick, kw, lorenzo.pieralisi, robh, linux-pci, linux-kernel Hello I get it and will send patch PATCH again. THX -----Original Message----- From: Bjorn Helgaas <helgaas@kernel.org> Sent: 2021年7月23日 0:52 To: Cai,Huoqing <caihuoqing@baidu.com> Cc: bhelgaas@google.com; jonathan.derrick@intel.com; kw@linux.com; onathan.derrick@intel.com; lorenzo.pieralisi@arm.com; robh@kernel.org; linux-pci@vger.kernel.org; linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/2] PCI: Make use of PCI_DEVICE_XXX() helper function On Thu, Jul 22, 2021 at 07:19:01PM +0800, Cai Huoqing wrote: > Could make use of PCI_DEVICE_XXX() helper function > > Cai Huoqing (2): > PCI: Make use of PCI_DEVICE_SUB/_CLASS() helper function > PCI: vmd: Make use of PCI_DEVICE_DATA() helper function > > drivers/pci/controller/vmd.c | 38 +++++++++++++++---------------- > drivers/pci/hotplug/cpqphp_core.c | 13 ++--------- > drivers/pci/search.c | 14 ++---------- > include/linux/pci_ids.h | 2 ++ > 4 files changed, 25 insertions(+), 42 deletions(-) When you fix the problem below, also: s/Make use of/Use/ Update commit log to say what the patch does. See https://chris.beams.io/posts/git-commit/ for hints. Add period at end of sentences. I don't see exactly what's wrong, but this series doesn't apply cleanly. I'm using b4 to fetch the series. b4 is from https://git.kernel.org/pub/scm/utils/b4/b4.git 11:47:04 ~/linux (main)$ git checkout -b wip/cai v5.14-rc1 Switched to a new branch 'wip/cai' 11:47:17 ~/linux (wip/cai)$ b4 am -om/ 20210722111903.432-1-caihuoqing@baidu.com Looking up https://lore.kernel.org/r/20210722111903.432-1-caihuoqing%40baidu.com Grabbing thread from lore.kernel.org/linux-pci Analyzing 3 messages in the thread --- Writing m/20210722_caihuoqing_pci_make_use_of_pci_device_xxx_helper_function.mbx [PATCH 1/2] PCI: Make use of PCI_DEVICE_SUB/_CLASS() helper function [PATCH 2/2] PCI: vmd: Make use of PCI_DEVICE_DATA() helper function --- Total patches: 2 --- Cover: m/20210722_caihuoqing_pci_make_use_of_pci_device_xxx_helper_function.cover Link: https://lore.kernel.org/r/20210722111903.432-1-caihuoqing@baidu.com Base: not found (applies clean to current tree) git am m/20210722_caihuoqing_pci_make_use_of_pci_device_xxx_helper_function.mbx 11:47:45 ~/linux (wip/cai)$ git am m/20210722_caihuoqing_pci_make_use_of_pci_device_xxx_helper_function.mbx Applying: PCI: Make use of PCI_DEVICE_SUB/_CLASS() helper function error: patch failed: drivers/pci/hotplug/cpqphp_core.c:1357 error: drivers/pci/hotplug/cpqphp_core.c: patch does not apply error: patch failed: drivers/pci/search.c:303 error: drivers/pci/search.c: patch does not apply Patch failed at 0001 PCI: Make use of PCI_DEVICE_SUB/_CLASS() helper function hint: Use 'git am --show-current-patch' to see the failed patch When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2021-07-23 3:28 UTC | newest] Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-07-22 11:29 [PATCH 0/2] PCI: Make use of PCI_DEVICE_XXX() helper function Cai Huoqing 2021-07-22 11:29 ` [PATCH 1/2] PCI: Make use of PCI_DEVICE_SUB/_CLASS() " Cai Huoqing 2021-07-22 11:29 ` [PATCH 2/2] PCI: vmd: Make use of PCI_DEVICE_DATA() " Cai Huoqing 2021-07-22 16:45 ` Derrick, Jonathan 2021-07-23 1:34 ` Cai,Huoqing 2021-07-23 2:00 ` Krzysztof Wilczyński 2021-07-23 3:28 ` Cai,Huoqing -- strict thread matches above, loose matches on Subject: below -- 2021-07-22 11:19 [PATCH 0/2] PCI: Make use of PCI_DEVICE_XXX() " Cai Huoqing 2021-07-22 16:52 ` Bjorn Helgaas 2021-07-23 1:30 ` Cai,Huoqing
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).