Dr. David Alan Gilbert
2011-Apr-03 21:32 UTC
Signed bit field; int have_hotplug_status_watch:1
Hi Ian, I've been going through some sparse scans of the kernel and it threw up: CHECK drivers/net/xen-netback/xenbus.c drivers/net/xen-netback/xenbus.c:29:40: error: dubious one-bit signed bitfield int have_hotplug_status_watch:1; from your patch f942dc2552b8bfdee607be867b12a8971bb9cd85 It does look like that should be an unsigned (given it's assigned 0 and 1) Dave -- -----Open up your eyes, open up your mind, open up your code ------- / Dr. David Alan Gilbert | Running GNU/Linux | Happy \ \ gro.gilbert @ treblig.org | | In Hex / \ _________________________|_____ http://www.treblig.org |_______/
On Sun, 2011-04-03 at 22:32 +0100, Dr. David Alan Gilbert wrote:> Hi Ian, > I've been going through some sparse scans of the kernel and > it threw up: > > CHECK drivers/net/xen-netback/xenbus.c > drivers/net/xen-netback/xenbus.c:29:40: error: dubious one-bit signed bitfield > > int have_hotplug_status_watch:1; > > from your patch f942dc2552b8bfdee607be867b12a8971bb9cd85 > > It does look like that should be an unsigned (given it's assigned > 0 and 1)I agree. 8<----------------------------------
From: Ian Campbell <Ian.Campbell at eu.citrix.com> Date: Mon, 4 Apr 2011 09:26:24 +0100> Subject: [PATCH] xen: netback: use unsigned type for one-bit bitfield. > > Fixes error from sparse: > CHECK drivers/net/xen-netback/xenbus.c > drivers/net/xen-netback/xenbus.c:29:40: error: dubious one-bit signed bitfield > > int have_hotplug_status_watch:1; > > Reported-by: Dr. David Alan Gilbert <linux at treblig.org> > Signed-off-by: Ian Campbell <ian.campbell at citrix.com>Applied to net-next-2.6, thanks.
Maybe Matching Threads
- Signed bit field; int have_hotplug_status_watch:1
- Signed bit field; int have_hotplug_status_watch:1
- [PATCH] xen: netback: use unsigned type for one-bit bitfield.
- [PATCH] xen: netback: use unsigned type for one-bit bitfield.
- [PATCH net-next 2/2] xen-netback: handle frontends that fail to transition through Closing