2010-02-11 23:03:21

by Hank Janssen

[permalink] [raw]
Subject: [PATCH 1/1] Staging: hv: Add proper versioning to HV drivers-Corrected.


Provide proper versioning information for all HV drivers.
With removal of build time/date/and Minor number as requested
By Greg KH

Cc: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Hank Janssen <[email protected]>
Signed-off-by: Haiyang Zhang <[email protected]>

drivers/staging/hv/VersionInfo.h | 22 +++++++++++++++++++---
drivers/staging/hv/Vmbus.c | 6 ++----
drivers/staging/hv/blkvsc_drv.c | 2 ++
drivers/staging/hv/netvsc_drv.c | 5 +++--
drivers/staging/hv/storvsc_drv.c | 2 ++
drivers/staging/hv/vmbus_drv.c | 2 ++
6 files changed, 30 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/hv/VersionInfo.h b/drivers/staging/hv/VersionInfo.h
index 9c3641d..10d7b19 100644
--- a/drivers/staging/hv/VersionInfo.h
+++ b/drivers/staging/hv/VersionInfo.h
@@ -24,8 +24,24 @@
#ifndef __HV_VERSION_INFO
#define __HV_VERSION_INFO

-static const char VersionDate[] = __DATE__;
-static const char VersionTime[] = __TIME__;
-static const char VersionDesc[] = "Version 2.0";
+/*
+ * We use the same version numbering for all Hyper-V modules.
+ *
+ * Definition of versioning is as follows;
+ *
+ * Major Number Changes for these scenarios;
+ * 1. When a new version of Windows Hyper-V
+ * is released.
+ * 2. A Major change has occurred in the
+ * Linux IC's.
+ * (For example the merge for the first time
+ * into the kernel) Every time the Major Number
+ * changes, the Revision number is reset to 0.
+ * Minor Number Changes when new functionality is added
+ * to the Linux IC's that is not a bug fix.
+ *
+ */
+#define HV_DRV_VERSION "3.0"
+

#endif
diff --git a/drivers/staging/hv/Vmbus.c b/drivers/staging/hv/Vmbus.c
index 35a023e..3d0a240 100644
--- a/drivers/staging/hv/Vmbus.c
+++ b/drivers/staging/hv/Vmbus.c
@@ -273,10 +273,8 @@ int VmbusInitialize(struct hv_driver *drv)

DPRINT_ENTER(VMBUS);

- DPRINT_INFO(VMBUS, "+++++++ Build Date=%s %s +++++++",
- VersionDate, VersionTime);
- DPRINT_INFO(VMBUS, "+++++++ Build Description=%s +++++++",
- VersionDesc);
+ DPRINT_INFO(VMBUS, "+++++++ HV Driver version = %s +++++++",
+ HV_DRV_VERSION);
DPRINT_INFO(VMBUS, "+++++++ Vmbus supported version = %d +++++++",
VMBUS_REVISION_NUMBER);
DPRINT_INFO(VMBUS, "+++++++ Vmbus using SINT %d +++++++",
diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c
index 62b2828..635692d 100644
--- a/drivers/staging/hv/blkvsc_drv.c
+++ b/drivers/staging/hv/blkvsc_drv.c
@@ -31,6 +31,7 @@
#include <scsi/scsi_dbg.h>
#include "osd.h"
#include "logging.h"
+#include "VersionInfo.h"
#include "vmbus.h"
#include "StorVscApi.h"

@@ -1507,6 +1508,7 @@ static void __exit blkvsc_exit(void)
}

MODULE_LICENSE("GPL");
+MODULE_VERSION(HV_DRV_VERSION);
module_param(blkvsc_ringbuffer_size, int, S_IRUGO);
module_init(blkvsc_init);
module_exit(blkvsc_exit);
diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c
index 3234a7c..0a78067 100644
--- a/drivers/staging/hv/netvsc_drv.c
+++ b/drivers/staging/hv/netvsc_drv.c
@@ -35,11 +35,10 @@
#include <net/pkt_sched.h>
#include "osd.h"
#include "logging.h"
+#include "VersionInfo.h"
#include "vmbus.h"
#include "NetVscApi.h"

-MODULE_LICENSE("GPL");
-
struct net_device_context {
/* point back to our device context */
struct device_context *device_ctx;
@@ -603,6 +602,8 @@ static void __exit netvsc_exit(void)
DPRINT_EXIT(NETVSC_DRV);
}

+MODULE_LICENSE("GPL");
+MODULE_VERSION(HV_DRV_VERSION);
module_param(netvsc_ringbuffer_size, int, S_IRUGO);

module_init(netvsc_init);
diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c
index 12f8f3f..a10fa0e 100644
--- a/drivers/staging/hv/storvsc_drv.c
+++ b/drivers/staging/hv/storvsc_drv.c
@@ -32,6 +32,7 @@
#include <scsi/scsi_dbg.h>
#include "osd.h"
#include "logging.h"
+#include "VersionInfo.h"
#include "vmbus.h"
#include "StorVscApi.h"

@@ -990,6 +991,7 @@ static void __exit storvsc_exit(void)
}

MODULE_LICENSE("GPL");
+MODULE_VERSION(HV_DRV_VERSION);
module_param(storvsc_ringbuffer_size, int, S_IRUGO);
module_init(storvsc_init);
module_exit(storvsc_exit);
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index 894eecf..92d70cd 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -24,6 +24,7 @@
#include <linux/irq.h>
#include <linux/interrupt.h>
#include <linux/sysctl.h>
+#include "VersionInfo.h"
#include "osd.h"
#include "logging.h"
#include "vmbus.h"
@@ -974,6 +975,7 @@ static void __exit vmbus_exit(void)
}

MODULE_LICENSE("GPL");
+MODULE_VERSION(HV_DRV_VERSION);
module_param(vmbus_irq, int, S_IRUGO);
module_param(vmbus_loglevel, int, S_IRUGO);


2010-02-11 23:39:00

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH 1/1] Staging: hv: Add proper versioning to HV drivers-Corrected.

Minor nits below:

On Thu, Feb 11, 2010 at 11:02:42PM +0000, Hank Janssen wrote:
>
> Provide proper versioning information for all HV drivers.
> With removal of build time/date/and Minor number as requested
> By Greg KH
>
> Cc: Greg Kroah-Hartman <[email protected]>
> Signed-off-by: Hank Janssen <[email protected]>
> Signed-off-by: Haiyang Zhang <[email protected]>

Don't line up the <email@domain>, just put only one space, there are a
few hundred thousand examples to look at for the correct formatting :)

>
> drivers/staging/hv/VersionInfo.h | 22 +++++++++++++++++++---

You forgot a "---" between the signed-off-by and the diffstat. If you
use either git or quilt, it will get this correct automagically. That
infers you used something else, which is quite scary. What are you
using instead to create patches?

Don't worry, I can edit this by hand when I apply it, and will do so in
a few days when I get to my "to-apply" queue, but in the future, please
don't do this.

thanks,

greg k-h

2010-02-12 17:55:38

by Hank Janssen

[permalink] [raw]
Subject: RE: [PATCH 1/1] Staging: hv: Add proper versioning to HV drivers-Corrected.


> >
> > drivers/staging/hv/VersionInfo.h | 22 +++++++++++++++++++---
>
> You forgot a "---" between the signed-off-by and the diffstat. If you
> use either git or quilt, it will get this correct automagically. That
> infers you used something else, which is quite scary. What are you
> using instead to create patches?
>
> Don't worry, I can edit this by hand when I apply it, and will do so in
> a few days when I get to my "to-apply" queue, but in the future, please
> don't do this.
>
> thanks,
>
> greg k-h

This must have been the result of a cut/paste error on my side.

I use the following command for my diff 'git diff -M -u --stat'

Btw, it was my understanding that the -M flag allows tracking of renamed
files as well as part of the diff output. (git mv) But my diff command
does not report on those. Am I doing something wrong?

Thanks,

Hank.

2010-02-12 18:54:42

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH 1/1] Staging: hv: Add proper versioning to HV drivers-Corrected.

On Fri, Feb 12, 2010 at 05:55:34PM +0000, Hank Janssen wrote:
>
> > >
> > > drivers/staging/hv/VersionInfo.h | 22 +++++++++++++++++++---
> >
> > You forgot a "---" between the signed-off-by and the diffstat. If you
> > use either git or quilt, it will get this correct automagically. That
> > infers you used something else, which is quite scary. What are you
> > using instead to create patches?
> >
> > Don't worry, I can edit this by hand when I apply it, and will do so in
> > a few days when I get to my "to-apply" queue, but in the future, please
> > don't do this.
> >
> > thanks,
> >
> > greg k-h
>
> This must have been the result of a cut/paste error on my side.
>
> I use the following command for my diff 'git diff -M -u --stat'

What's wrong with 'git format-patch'?

You are creating a "raw" diff, which is fine, but you then need to
include the rest of the comments. If you commit the patch to a branch,
with the comments in them, then you can just automatically create the
patches in correct format.

> Btw, it was my understanding that the -M flag allows tracking of renamed
> files as well as part of the diff output. (git mv) But my diff command
> does not report on those. Am I doing something wrong?

You aren't renaming anything :)

Also, don't do that for patches you send through emails, quilt can not
handle them properly, which is what I require for the patches sent to
me. When I queue them up to Linus, git properly figures out renames and
the like, so you don't need to worry about that.

thanks,

greg k-h

2010-02-12 19:40:07

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [PATCH 1/1] Staging: hv: Add proper versioning to HV drivers-Corrected.

On Fri, Feb 12, 2010 at 10:47 AM, Greg KH <[email protected]> wrote:
> On Fri, Feb 12, 2010 at 05:55:34PM +0000, Hank Janssen wrote:
>>
>> > >
>> > >  drivers/staging/hv/VersionInfo.h |   22 +++++++++++++++++++---
>> >
>> > You forgot a "---" between the signed-off-by and the diffstat.  If you
>> > use either git or quilt, it will get this correct automagically.  That
>> > infers you used something else, which is quite scary.  What are you
>> > using instead to create patches?
>> >
>> > Don't worry, I can edit this by hand when I apply it, and will do so in
>> > a few days when I get to my "to-apply" queue, but in the future, please
>> > don't do this.
>> >
>> > thanks,
>> >
>> > greg k-h
>>
>> This must have been the result of a cut/paste error on my side.
>>
>> I use the following command for my diff   'git diff -M -u --stat'
>
> What's wrong with 'git format-patch'?
>
> You are creating a "raw" diff, which is fine, but you then need to
> include the rest of the comments.  If you commit the patch to a branch,
> with the comments in them, then you can just automatically create the
> patches in correct format.

In case this helps:

http://wireless.kernel.org/en/developers/Documentation/git-guide

Toward s the end there is a git format-patch blurb and explains how to
set up your e-mail client with ssmpt.

Luis