[PATCH 5/6] Correcting truncation error for constant HV_CRASH_CTL_CRASH_NOTIFY

2015-03-06 Thread K. Y. Srinivasan
From: Nick Meier 

HV_CRASH_CTL_CRASH_NOTIFY is a 64 bit number.  Depending on the usage context,
the value may be truncated. This patch is in response from the following
email from Intel:

[char-misc:char-misc-testing 25/45] drivers/hv/vmbus_drv.c:67:9: sparse:
   constant 0x8000 is so big it is unsigned long

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git 
char-misc-testing
head:   b3de8e3719e582f3182bb504295e4a8e43c8c96f
commit: 96c1d0581d00f7abe033350edb021a9d947d8d81 [25/45] Drivers: hv: 
vmbus: Add support for VMBus panic notifier handler
reproduce:
  # apt-get install sparse
  git checkout 96c1d0581d00f7abe033350edb021a9d947d8d81
  make ARCH=x86_64 allmodconfig
  make C=1 CF=-D__CHECK_ENDIAN__

sparse warnings: (new ones prefixed by >>)

drivers/hv/vmbus_drv.c:67:9: sparse: constant 0x8000 is so big 
it is unsigned long
...

Signed-off-by: Nick Meier 
Signed-off-by: K. Y. Srinivasan 
---
 drivers/hv/hyperv_vmbus.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h
index 6339589..c8e27e0 100644
--- a/drivers/hv/hyperv_vmbus.h
+++ b/drivers/hv/hyperv_vmbus.h
@@ -58,7 +58,7 @@ enum hv_cpuid_function {
 #define HV_X64_MSR_CRASH_P4   0x4104
 #define HV_X64_MSR_CRASH_CTL  0x4105
 
-#define HV_CRASH_CTL_CRASH_NOTIFY 0x8000
+#define HV_CRASH_CTL_CRASH_NOTIFY (1ULL << 63)
 
 /* Define version of the synthetic interrupt controller. */
 #define HV_SYNIC_VERSION   (1)
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 5/6] Correcting truncation error for constant HV_CRASH_CTL_CRASH_NOTIFY

2015-03-06 Thread K. Y. Srinivasan
From: Nick Meier nme...@microsoft.com

HV_CRASH_CTL_CRASH_NOTIFY is a 64 bit number.  Depending on the usage context,
the value may be truncated. This patch is in response from the following
email from Intel:

[char-misc:char-misc-testing 25/45] drivers/hv/vmbus_drv.c:67:9: sparse:
   constant 0x8000 is so big it is unsigned long

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git 
char-misc-testing
head:   b3de8e3719e582f3182bb504295e4a8e43c8c96f
commit: 96c1d0581d00f7abe033350edb021a9d947d8d81 [25/45] Drivers: hv: 
vmbus: Add support for VMBus panic notifier handler
reproduce:
  # apt-get install sparse
  git checkout 96c1d0581d00f7abe033350edb021a9d947d8d81
  make ARCH=x86_64 allmodconfig
  make C=1 CF=-D__CHECK_ENDIAN__

sparse warnings: (new ones prefixed by )

drivers/hv/vmbus_drv.c:67:9: sparse: constant 0x8000 is so big 
it is unsigned long
...

Signed-off-by: Nick Meier nme...@microsoft.com
Signed-off-by: K. Y. Srinivasan k...@microsoft.com
---
 drivers/hv/hyperv_vmbus.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h
index 6339589..c8e27e0 100644
--- a/drivers/hv/hyperv_vmbus.h
+++ b/drivers/hv/hyperv_vmbus.h
@@ -58,7 +58,7 @@ enum hv_cpuid_function {
 #define HV_X64_MSR_CRASH_P4   0x4104
 #define HV_X64_MSR_CRASH_CTL  0x4105
 
-#define HV_CRASH_CTL_CRASH_NOTIFY 0x8000
+#define HV_CRASH_CTL_CRASH_NOTIFY (1ULL  63)
 
 /* Define version of the synthetic interrupt controller. */
 #define HV_SYNIC_VERSION   (1)
-- 
1.7.4.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/