linux-hyperv.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Use PCI_VENDOR_ID_MICROSOFT define instead of magic number
@ 2022-09-19 22:04 Easwar Hariharan
  2022-09-19 22:04 ` [PATCH] hv: Use PCI_VENDOR_ID_MICROSOFT for better discoverability Easwar Hariharan
  0 siblings, 1 reply; 5+ messages in thread
From: Easwar Hariharan @ 2022-09-19 22:04 UTC (permalink / raw)
  To: kys, haiyangz, sthemmin, wei.liu, decui, linux-hyperv, linux-kernel

From: Easwar Hariharan <easwar.hariharan@linux.microsoft.com>

pci_ids.h already defines PCI_VENDOR_ID_MICROSOFT, and is included via
linux/pci.h. Use the define instead of the magic number.

base-commit: f0880e2cb7e1f8039a048fdd01ce45ab77247221

Easwar Hariharan (1):
  hv: Use PCI_VENDOR_ID_MICROSOFT for better discoverability

 drivers/hv/vmbus_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] hv: Use PCI_VENDOR_ID_MICROSOFT for better discoverability
  2022-09-19 22:04 [PATCH] Use PCI_VENDOR_ID_MICROSOFT define instead of magic number Easwar Hariharan
@ 2022-09-19 22:04 ` Easwar Hariharan
  2022-09-22 22:39   ` Michael Kelley (LINUX)
  0 siblings, 1 reply; 5+ messages in thread
From: Easwar Hariharan @ 2022-09-19 22:04 UTC (permalink / raw)
  To: kys, haiyangz, sthemmin, wei.liu, decui, linux-hyperv, linux-kernel

From: Easwar Hariharan <easwar.hariharan@microsoft.com>

pci_ids.h already defines PCI_VENDOR_ID_MICROSOFT, and is included via
linux/pci.h. Use the define instead of the magic number.

Signed-off-by: Easwar Hariharan <easwar.hariharan@microsoft.com>
---
 drivers/hv/vmbus_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
index 3c833ea..f2efb74 100644
--- a/drivers/hv/vmbus_drv.c
+++ b/drivers/hv/vmbus_drv.c
@@ -2052,7 +2052,7 @@ struct hv_device *vmbus_device_create(const guid_t *type,
 	child_device_obj->channel = channel;
 	guid_copy(&child_device_obj->dev_type, type);
 	guid_copy(&child_device_obj->dev_instance, instance);
-	child_device_obj->vendor_id = 0x1414; /* MSFT vendor ID */
+	child_device_obj->vendor_id = PCI_VENDOR_ID_MICROSOFT;
 
 	return child_device_obj;
 }
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* RE: [PATCH] hv: Use PCI_VENDOR_ID_MICROSOFT for better discoverability
  2022-09-19 22:04 ` [PATCH] hv: Use PCI_VENDOR_ID_MICROSOFT for better discoverability Easwar Hariharan
@ 2022-09-22 22:39   ` Michael Kelley (LINUX)
  2022-09-22 22:43     ` Michael Kelley (LINUX)
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Kelley (LINUX) @ 2022-09-22 22:39 UTC (permalink / raw)
  To: Easwar Hariharan, KY Srinivasan, Haiyang Zhang,
	Stephen Hemminger, wei.liu, Dexuan Cui, linux-hyperv,
	linux-kernel

From: Easwar Hariharan <eahariha@linux.microsoft.com> Sent: Monday, September 19, 2022 3:05 PM
> 
> pci_ids.h already defines PCI_VENDOR_ID_MICROSOFT, and is included via
> linux/pci.h. Use the define instead of the magic number.
> 
> Signed-off-by: Easwar Hariharan <easwar.hariharan@microsoft.com>
> ---
>  drivers/hv/vmbus_drv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
> index 3c833ea..f2efb74 100644
> --- a/drivers/hv/vmbus_drv.c
> +++ b/drivers/hv/vmbus_drv.c
> @@ -2052,7 +2052,7 @@ struct hv_device *vmbus_device_create(const guid_t *type,
>  	child_device_obj->channel = channel;
>  	guid_copy(&child_device_obj->dev_type, type);
>  	guid_copy(&child_device_obj->dev_instance, instance);
> -	child_device_obj->vendor_id = 0x1414; /* MSFT vendor ID */
> +	child_device_obj->vendor_id = PCI_VENDOR_ID_MICROSOFT;
> 
>  	return child_device_obj;
>  }
> --
> 1.8.3.1

Reviewed-by: Michael Kelley <mikelley@microsoft.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] hv: Use PCI_VENDOR_ID_MICROSOFT for better discoverability
  2022-09-22 22:39   ` Michael Kelley (LINUX)
@ 2022-09-22 22:43     ` Michael Kelley (LINUX)
  2022-09-23 10:31       ` Wei Liu
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Kelley (LINUX) @ 2022-09-22 22:43 UTC (permalink / raw)
  To: Michael Kelley (LINUX),
	Easwar Hariharan, KY Srinivasan, Haiyang Zhang,
	Stephen Hemminger, wei.liu, Dexuan Cui, linux-hyperv,
	linux-kernel

From: Michael Kelley (LINUX) <mikelley@microsoft.com> Sent: Thursday, September 22, 2022 3:39 PM
> 
> From: Easwar Hariharan <eahariha@linux.microsoft.com> Sent: Monday, September
> 19, 2022 3:05 PM
> >
> > pci_ids.h already defines PCI_VENDOR_ID_MICROSOFT, and is included via
> > linux/pci.h. Use the define instead of the magic number.
> >
> > Signed-off-by: Easwar Hariharan <easwar.hariharan@microsoft.com>
> > ---
> >  drivers/hv/vmbus_drv.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
> > index 3c833ea..f2efb74 100644
> > --- a/drivers/hv/vmbus_drv.c
> > +++ b/drivers/hv/vmbus_drv.c
> > @@ -2052,7 +2052,7 @@ struct hv_device *vmbus_device_create(const guid_t
> *type,
> >  	child_device_obj->channel = channel;
> >  	guid_copy(&child_device_obj->dev_type, type);
> >  	guid_copy(&child_device_obj->dev_instance, instance);
> > -	child_device_obj->vendor_id = 0x1414; /* MSFT vendor ID */
> > +	child_device_obj->vendor_id = PCI_VENDOR_ID_MICROSOFT;
> >
> >  	return child_device_obj;
> >  }
> > --
> > 1.8.3.1
> 
> Reviewed-by: Michael Kelley <mikelley@microsoft.com>

Actually, a nit:  The short commit message should start with "Drivers: hv:" or
"Drivers: hv: vmbus:".  Check the commit history on vmbus_drv.c and you'll
see the standard usage.

Michael


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] hv: Use PCI_VENDOR_ID_MICROSOFT for better discoverability
  2022-09-22 22:43     ` Michael Kelley (LINUX)
@ 2022-09-23 10:31       ` Wei Liu
  0 siblings, 0 replies; 5+ messages in thread
From: Wei Liu @ 2022-09-23 10:31 UTC (permalink / raw)
  To: Michael Kelley (LINUX)
  Cc: Easwar Hariharan, KY Srinivasan, Haiyang Zhang,
	Stephen Hemminger, wei.liu, Dexuan Cui, linux-hyperv,
	linux-kernel

On Thu, Sep 22, 2022 at 10:43:24PM +0000, Michael Kelley (LINUX) wrote:
> From: Michael Kelley (LINUX) <mikelley@microsoft.com> Sent: Thursday, September 22, 2022 3:39 PM
> > 
> > From: Easwar Hariharan <eahariha@linux.microsoft.com> Sent: Monday, September
> > 19, 2022 3:05 PM
> > >
> > > pci_ids.h already defines PCI_VENDOR_ID_MICROSOFT, and is included via
> > > linux/pci.h. Use the define instead of the magic number.
> > >
> > > Signed-off-by: Easwar Hariharan <easwar.hariharan@microsoft.com>
> > > ---
> > >  drivers/hv/vmbus_drv.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
> > > index 3c833ea..f2efb74 100644
> > > --- a/drivers/hv/vmbus_drv.c
> > > +++ b/drivers/hv/vmbus_drv.c
> > > @@ -2052,7 +2052,7 @@ struct hv_device *vmbus_device_create(const guid_t
> > *type,
> > >  	child_device_obj->channel = channel;
> > >  	guid_copy(&child_device_obj->dev_type, type);
> > >  	guid_copy(&child_device_obj->dev_instance, instance);
> > > -	child_device_obj->vendor_id = 0x1414; /* MSFT vendor ID */
> > > +	child_device_obj->vendor_id = PCI_VENDOR_ID_MICROSOFT;
> > >
> > >  	return child_device_obj;
> > >  }
> > > --
> > > 1.8.3.1
> > 
> > Reviewed-by: Michael Kelley <mikelley@microsoft.com>
> 
> Actually, a nit:  The short commit message should start with "Drivers: hv:" or
> "Drivers: hv: vmbus:".  Check the commit history on vmbus_drv.c and you'll
> see the standard usage.

I fixed up the commit message and applied it to hyperv-next. Thanks.

> 
> Michael
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-09-23 10:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-19 22:04 [PATCH] Use PCI_VENDOR_ID_MICROSOFT define instead of magic number Easwar Hariharan
2022-09-19 22:04 ` [PATCH] hv: Use PCI_VENDOR_ID_MICROSOFT for better discoverability Easwar Hariharan
2022-09-22 22:39   ` Michael Kelley (LINUX)
2022-09-22 22:43     ` Michael Kelley (LINUX)
2022-09-23 10:31       ` Wei Liu

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).