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

From: Nick Meier
Date: Mon Mar 02 2015 - 17:11:53 EST


I will correct this constant definition and resubmit.

-Nick Meier

-----Original Message-----
From: kbuild test robot [mailto:fengguang.wu@xxxxxxxxx]
Sent: Sunday, March 1, 2015 8:49 PM
To: Nick Meier
Cc: kbuild-all@xxxxxx; Greg Kroah-Hartman; KY Srinivasan; Haiyang Zhang; devel@xxxxxxxxxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
Subject: [char-misc:char-misc-testing 25/45] drivers/hv/vmbus_drv.c:67:9: sparse: constant 0x8000000000000000 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 0x8000000000000000 is so big it is unsigned long
>> drivers/hv/vmbus_drv.c:67:9: sparse: constant 0x8000000000000000 is so big it is unsigned long
>> drivers/hv/vmbus_drv.c:51:5: sparse: symbol 'hyperv_panic_event' was not declared. Should it be static?
>> drivers/hv/vmbus_drv.c:67:9: sparse: cast truncates bits from constant value (8000000000000000 becomes 0)

Please review and possibly fold the followup patch.

vim +67 drivers/hv/vmbus_drv.c

45
46 static struct tasklet_struct msg_dpc;
47 static struct completion probe_event;
48 static int irq;
49
50
> 51 int hyperv_panic_event(struct notifier_block *nb,
52 unsigned long event, void *ptr)
53 {
54 struct pt_regs *regs;
55
56 regs = current_pt_regs();
57
58 wrmsrl(HV_X64_MSR_CRASH_P0, regs->ip);
59 wrmsrl(HV_X64_MSR_CRASH_P1, regs->ax);
60 wrmsrl(HV_X64_MSR_CRASH_P2, regs->bx);
61 wrmsrl(HV_X64_MSR_CRASH_P3, regs->cx);
62 wrmsrl(HV_X64_MSR_CRASH_P4, regs->dx);
63
64 /*
65 * Let Hyper-V know there is crash data available
66 */
> 67 wrmsrl(HV_X64_MSR_CRASH_CTL, HV_CRASH_CTL_CRASH_NOTIFY);
68 return NOTIFY_DONE;
69 }
70

---
0-DAY kernel test infrastructure Open Source Technology Center
http://lists.01.org/mailman/listinfo/kbuild Intel Corporation
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/