netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net/hyperv: Advertise hv_netvsc instead of netvsc as driver name
@ 2012-03-07 19:05 Haiyang Zhang
  2012-03-07 19:22 ` Greg KH
  2012-03-07 20:17 ` Olaf Hering
  0 siblings, 2 replies; 11+ messages in thread
From: Haiyang Zhang @ 2012-03-07 19:05 UTC (permalink / raw)
  To: haiyangz, kys, davem, netdev, linux-kernel, devel; +Cc: Olaf Hering

From: Olaf Hering <olaf@aepfle.de>

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
---
 drivers/net/hyperv/netvsc_drv.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index 0ae7a1a..53d1ee5 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -40,6 +40,8 @@
 
 #include "hyperv_net.h"
 
+#define MODULE_NAME "hv_netvsc"
+
 struct net_device_context {
 	/* point back to our device context */
 	struct hv_device *device_ctx;
@@ -310,7 +312,7 @@ int netvsc_recv_callback(struct hv_device *device_obj,
 static void netvsc_get_drvinfo(struct net_device *net,
 			       struct ethtool_drvinfo *info)
 {
-	strcpy(info->driver, "hv_netvsc");
+	strcpy(info->driver, MODULE_NAME);
 	strcpy(info->version, HV_DRV_VERSION);
 	strcpy(info->fw_version, "N/A");
 }
@@ -482,7 +484,7 @@ MODULE_DEVICE_TABLE(vmbus, id_table);
 
 /* The one and only one */
 static struct  hv_driver netvsc_drv = {
-	.name = "netvsc",
+	.name = MODULE_NAME,
 	.id_table = id_table,
 	.probe = netvsc_probe,
 	.remove = netvsc_remove,
-- 
1.7.4.1

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

* Re: [PATCH] net/hyperv: Advertise hv_netvsc instead of netvsc as driver name
  2012-03-07 19:05 [PATCH] net/hyperv: Advertise hv_netvsc instead of netvsc as driver name Haiyang Zhang
@ 2012-03-07 19:22 ` Greg KH
  2012-03-07 19:57   ` Haiyang Zhang
  2012-03-07 20:17 ` Olaf Hering
  1 sibling, 1 reply; 11+ messages in thread
From: Greg KH @ 2012-03-07 19:22 UTC (permalink / raw)
  To: Haiyang Zhang; +Cc: Olaf Hering, netdev, linux-kernel, devel, davem

On Wed, Mar 07, 2012 at 11:05:31AM -0800, Haiyang Zhang wrote:
> From: Olaf Hering <olaf@aepfle.de>
> 
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
> ---
>  drivers/net/hyperv/netvsc_drv.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
> index 0ae7a1a..53d1ee5 100644
> --- a/drivers/net/hyperv/netvsc_drv.c
> +++ b/drivers/net/hyperv/netvsc_drv.c
> @@ -40,6 +40,8 @@
>  
>  #include "hyperv_net.h"
>  
> +#define MODULE_NAME "hv_netvsc"

No, please use the built-in macro for this and don't define your own,
that's totally redundant.

greg k-h

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

* RE: [PATCH] net/hyperv: Advertise hv_netvsc instead of netvsc as driver name
  2012-03-07 19:22 ` Greg KH
@ 2012-03-07 19:57   ` Haiyang Zhang
  0 siblings, 0 replies; 11+ messages in thread
From: Haiyang Zhang @ 2012-03-07 19:57 UTC (permalink / raw)
  To: Greg KH
  Cc: KY Srinivasan, davem@davemloft.net, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, devel@linuxdriverproject.org,
	Olaf Hering



> -----Original Message-----
> From: Greg KH [mailto:greg@kroah.com]
> Sent: Wednesday, March 07, 2012 2:22 PM
> To: Haiyang Zhang
> Cc: KY Srinivasan; davem@davemloft.net; netdev@vger.kernel.org; linux-
> kernel@vger.kernel.org; devel@linuxdriverproject.org; Olaf Hering
> Subject: Re: [PATCH] net/hyperv: Advertise hv_netvsc instead of netvsc as
> driver name
> 
> On Wed, Mar 07, 2012 at 11:05:31AM -0800, Haiyang Zhang wrote:
> > From: Olaf Hering <olaf@aepfle.de>
> >
> > Signed-off-by: Olaf Hering <olaf@aepfle.de>
> > Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
> > Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
> > ---
> >  drivers/net/hyperv/netvsc_drv.c |    6 ++++--
> >  1 files changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/net/hyperv/netvsc_drv.c
> b/drivers/net/hyperv/netvsc_drv.c
> > index 0ae7a1a..53d1ee5 100644
> > --- a/drivers/net/hyperv/netvsc_drv.c
> > +++ b/drivers/net/hyperv/netvsc_drv.c
> > @@ -40,6 +40,8 @@
> >
> >  #include "hyperv_net.h"
> >
> > +#define MODULE_NAME "hv_netvsc"
> 
> No, please use the built-in macro for this and don't define your own,
> that's totally redundant.

I have submitted a patch using the built-in KBUILD_MODNAME.
Thanks,
- Haiyang

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

* Re: [PATCH] net/hyperv: Advertise hv_netvsc instead of netvsc as driver name
  2012-03-07 19:05 [PATCH] net/hyperv: Advertise hv_netvsc instead of netvsc as driver name Haiyang Zhang
  2012-03-07 19:22 ` Greg KH
@ 2012-03-07 20:17 ` Olaf Hering
  2012-03-07 20:49   ` Greg KH
  1 sibling, 1 reply; 11+ messages in thread
From: Olaf Hering @ 2012-03-07 20:17 UTC (permalink / raw)
  To: davem; +Cc: Haiyang Zhang, kys, davem, netdev, linux-kernel, devel

On Wed, Mar 07, Haiyang Zhang wrote:


> @@ -482,7 +484,7 @@ MODULE_DEVICE_TABLE(vmbus, id_table);
>  
>  /* The one and only one */
>  static struct  hv_driver netvsc_drv = {
> -	.name = "netvsc",
> +	.name = MODULE_NAME,

It would be nice if this could be applied to 3.3.
hv_storvsc and hid-hyperv already use the same naming, this patch was
send last year already but was not applied for some reason.

Olaf

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

* Re: [PATCH] net/hyperv: Advertise hv_netvsc instead of netvsc as driver name
  2012-03-07 20:17 ` Olaf Hering
@ 2012-03-07 20:49   ` Greg KH
  2012-03-08  6:16     ` Olaf Hering
  0 siblings, 1 reply; 11+ messages in thread
From: Greg KH @ 2012-03-07 20:49 UTC (permalink / raw)
  To: Olaf Hering; +Cc: devel, netdev, Haiyang Zhang, davem, linux-kernel

On Wed, Mar 07, 2012 at 09:17:46PM +0100, Olaf Hering wrote:
> On Wed, Mar 07, Haiyang Zhang wrote:
> 
> 
> > @@ -482,7 +484,7 @@ MODULE_DEVICE_TABLE(vmbus, id_table);
> >  
> >  /* The one and only one */
> >  static struct  hv_driver netvsc_drv = {
> > -	.name = "netvsc",
> > +	.name = MODULE_NAME,
> 
> It would be nice if this could be applied to 3.3.
> hv_storvsc and hid-hyperv already use the same naming, this patch was
> send last year already but was not applied for some reason.

What userspace tools depend on this that requires it to be in 3.3?

greg k-h

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

* Re: [PATCH] net/hyperv: Advertise hv_netvsc instead of netvsc as driver name
  2012-03-07 20:49   ` Greg KH
@ 2012-03-08  6:16     ` Olaf Hering
  2012-03-08 15:52       ` Greg KH
  0 siblings, 1 reply; 11+ messages in thread
From: Olaf Hering @ 2012-03-08  6:16 UTC (permalink / raw)
  To: Greg KH; +Cc: davem, netdev, Haiyang Zhang, linux-kernel, devel

On Wed, Mar 07, Greg KH wrote:

> On Wed, Mar 07, 2012 at 09:17:46PM +0100, Olaf Hering wrote:
> > On Wed, Mar 07, Haiyang Zhang wrote:
> > 
> > 
> > > @@ -482,7 +484,7 @@ MODULE_DEVICE_TABLE(vmbus, id_table);
> > >  
> > >  /* The one and only one */
> > >  static struct  hv_driver netvsc_drv = {
> > > -	.name = "netvsc",
> > > +	.name = MODULE_NAME,
> > 
> > It would be nice if this could be applied to 3.3.
> > hv_storvsc and hid-hyperv already use the same naming, this patch was
> > send last year already but was not applied for some reason.
> 
> What userspace tools depend on this that requires it to be in 3.3?

It represents the module names, at least for pci and other bus types.
hwinfo uses it to recognize a network interface (storage in case of
hv_storvsc).

Olaf

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

* Re: [PATCH] net/hyperv: Advertise hv_netvsc instead of netvsc as driver name
  2012-03-08  6:16     ` Olaf Hering
@ 2012-03-08 15:52       ` Greg KH
  2012-03-08 16:12         ` Olaf Hering
  0 siblings, 1 reply; 11+ messages in thread
From: Greg KH @ 2012-03-08 15:52 UTC (permalink / raw)
  To: Olaf Hering; +Cc: devel, netdev, Haiyang Zhang, davem, linux-kernel

On Thu, Mar 08, 2012 at 07:16:16AM +0100, Olaf Hering wrote:
> On Wed, Mar 07, Greg KH wrote:
> 
> > On Wed, Mar 07, 2012 at 09:17:46PM +0100, Olaf Hering wrote:
> > > On Wed, Mar 07, Haiyang Zhang wrote:
> > > 
> > > 
> > > > @@ -482,7 +484,7 @@ MODULE_DEVICE_TABLE(vmbus, id_table);
> > > >  
> > > >  /* The one and only one */
> > > >  static struct  hv_driver netvsc_drv = {
> > > > -	.name = "netvsc",
> > > > +	.name = MODULE_NAME,
> > > 
> > > It would be nice if this could be applied to 3.3.
> > > hv_storvsc and hid-hyperv already use the same naming, this patch was
> > > send last year already but was not applied for some reason.
> > 
> > What userspace tools depend on this that requires it to be in 3.3?
> 
> It represents the module names, at least for pci and other bus types.

Yes, but no one should care what the name of the module is.

> hwinfo uses it to recognize a network interface (storage in case of
> hv_storvsc).

That tool should report the real module name, not rely on the name to
match based on the structure, if you really care about the real module
name.

greg k-h

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

* Re: [PATCH] net/hyperv: Advertise hv_netvsc instead of netvsc as driver name
  2012-03-08 15:52       ` Greg KH
@ 2012-03-08 16:12         ` Olaf Hering
  2012-03-08 17:42           ` Greg KH
  0 siblings, 1 reply; 11+ messages in thread
From: Olaf Hering @ 2012-03-08 16:12 UTC (permalink / raw)
  To: Greg KH; +Cc: davem, netdev, Haiyang Zhang, linux-kernel, devel

On Thu, Mar 08, Greg KH wrote:

> > hwinfo uses it to recognize a network interface (storage in case of
> > hv_storvsc).
> 
> That tool should report the real module name, not rely on the name to
> match based on the structure, if you really care about the real module
> name.

Its about the driver symlink, not the module name. 

I think most, if not all, (relevant) drivers use some sort of
KBUILD_MODNAME. Why should this driver be any different?

Olaf

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

* Re: [PATCH] net/hyperv: Advertise hv_netvsc instead of netvsc as driver name
  2012-03-08 16:12         ` Olaf Hering
@ 2012-03-08 17:42           ` Greg KH
  2012-03-08 18:38             ` Olaf Hering
  0 siblings, 1 reply; 11+ messages in thread
From: Greg KH @ 2012-03-08 17:42 UTC (permalink / raw)
  To: Olaf Hering; +Cc: davem, netdev, Haiyang Zhang, linux-kernel, devel

On Thu, Mar 08, 2012 at 05:12:21PM +0100, Olaf Hering wrote:
> On Thu, Mar 08, Greg KH wrote:
> 
> > > hwinfo uses it to recognize a network interface (storage in case of
> > > hv_storvsc).
> > 
> > That tool should report the real module name, not rely on the name to
> > match based on the structure, if you really care about the real module
> > name.
> 
> Its about the driver symlink, not the module name. 
> 
> I think most, if not all, (relevant) drivers use some sort of
> KBUILD_MODNAME. Why should this driver be any different?

It shouldn't, I'm not saying that at all.  I'm only objecting to the
insistance that this be something worthwhile for 3.3-final which should
be out any day now.

greg k-h

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

* Re: [PATCH] net/hyperv: Advertise hv_netvsc instead of netvsc as driver name
  2012-03-08 17:42           ` Greg KH
@ 2012-03-08 18:38             ` Olaf Hering
  2012-03-08 18:45               ` Greg KH
  0 siblings, 1 reply; 11+ messages in thread
From: Olaf Hering @ 2012-03-08 18:38 UTC (permalink / raw)
  To: Greg KH; +Cc: davem, netdev, Haiyang Zhang, linux-kernel, devel

On Thu, Mar 08, Greg KH wrote:

> On Thu, Mar 08, 2012 at 05:12:21PM +0100, Olaf Hering wrote:
> > On Thu, Mar 08, Greg KH wrote:
> > 
> > > > hwinfo uses it to recognize a network interface (storage in case of
> > > > hv_storvsc).
> > > 
> > > That tool should report the real module name, not rely on the name to
> > > match based on the structure, if you really care about the real module
> > > name.
> > 
> > Its about the driver symlink, not the module name. 
> > 
> > I think most, if not all, (relevant) drivers use some sort of
> > KBUILD_MODNAME. Why should this driver be any different?
> 
> It shouldn't, I'm not saying that at all.  I'm only objecting to the
> insistance that this be something worthwhile for 3.3-final which should
> be out any day now.

Since its an API we could settle on the new string, which is already in
distro use.

Olaf

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

* Re: [PATCH] net/hyperv: Advertise hv_netvsc instead of netvsc as driver name
  2012-03-08 18:38             ` Olaf Hering
@ 2012-03-08 18:45               ` Greg KH
  0 siblings, 0 replies; 11+ messages in thread
From: Greg KH @ 2012-03-08 18:45 UTC (permalink / raw)
  To: Olaf Hering; +Cc: davem, netdev, Haiyang Zhang, linux-kernel, devel

On Thu, Mar 08, 2012 at 07:38:20PM +0100, Olaf Hering wrote:
> On Thu, Mar 08, Greg KH wrote:
> 
> > On Thu, Mar 08, 2012 at 05:12:21PM +0100, Olaf Hering wrote:
> > > On Thu, Mar 08, Greg KH wrote:
> > > 
> > > > > hwinfo uses it to recognize a network interface (storage in case of
> > > > > hv_storvsc).
> > > > 
> > > > That tool should report the real module name, not rely on the name to
> > > > match based on the structure, if you really care about the real module
> > > > name.
> > > 
> > > Its about the driver symlink, not the module name. 
> > > 
> > > I think most, if not all, (relevant) drivers use some sort of
> > > KBUILD_MODNAME. Why should this driver be any different?
> > 
> > It shouldn't, I'm not saying that at all.  I'm only objecting to the
> > insistance that this be something worthwhile for 3.3-final which should
> > be out any day now.
> 
> Since its an API we could settle on the new string, which is already in
> distro use.

I don't really understand, but in the end, it's not up to me, it's up to
the network maintainer when he wants to merge this to Linus.  If it were
up to me, I would wait for 3.4.

good luck,

greg k-h

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

end of thread, other threads:[~2012-03-08 18:45 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-07 19:05 [PATCH] net/hyperv: Advertise hv_netvsc instead of netvsc as driver name Haiyang Zhang
2012-03-07 19:22 ` Greg KH
2012-03-07 19:57   ` Haiyang Zhang
2012-03-07 20:17 ` Olaf Hering
2012-03-07 20:49   ` Greg KH
2012-03-08  6:16     ` Olaf Hering
2012-03-08 15:52       ` Greg KH
2012-03-08 16:12         ` Olaf Hering
2012-03-08 17:42           ` Greg KH
2012-03-08 18:38             ` Olaf Hering
2012-03-08 18:45               ` Greg KH

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