* Signed bit field; int have_hotplug_status_watch:1
@ 2011-04-03 21:32 Dr. David Alan Gilbert
2011-04-04 8:26 ` Ian Campbell
[not found] ` <1301905584.23887.49.camel@zakaz.uk.xensource.com>
0 siblings, 2 replies; 3+ messages in thread
From: Dr. David Alan Gilbert @ 2011-04-03 21:32 UTC (permalink / raw)
To: Ian.Campbell, virtualization; +Cc: jeremy.fitzhardinge, konrad.wilk
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 |_______/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Signed bit field; int have_hotplug_status_watch:1
2011-04-03 21:32 Signed bit field; int have_hotplug_status_watch:1 Dr. David Alan Gilbert
@ 2011-04-04 8:26 ` Ian Campbell
[not found] ` <1301905584.23887.49.camel@zakaz.uk.xensource.com>
1 sibling, 0 replies; 3+ messages in thread
From: Ian Campbell @ 2011-04-04 8:26 UTC (permalink / raw)
To: Dr. David Alan Gilbert
Cc: netdev, Jeremy Fitzhardinge, xen-devel, konrad.wilk@oracle.com,
virtualization@lists.linux-foundation.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 38fdb7199a0c3c5eb18ec27d2380e21116c97e29 Mon Sep 17 00:00:00 2001
From: Ian Campbell <ian.campbell@citrix.com>
Date: Mon, 4 Apr 2011 09:18:35 +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@treblig.org>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: netdev@vger.kernel.org
Cc: xen-devel@lists.xensource.com
---
drivers/net/xen-netback/xenbus.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-netback/xenbus.c
index 22b8c35..1ce729d 100644
--- a/drivers/net/xen-netback/xenbus.c
+++ b/drivers/net/xen-netback/xenbus.c
@@ -26,7 +26,7 @@ struct backend_info {
struct xenvif *vif;
enum xenbus_state frontend_state;
struct xenbus_watch hotplug_status_watch;
- int have_hotplug_status_watch:1;
+ u8 have_hotplug_status_watch:1;
};
static int connect_rings(struct backend_info *);
--
1.7.2.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: Signed bit field; int have_hotplug_status_watch:1
[not found] ` <1301905584.23887.49.camel@zakaz.uk.xensource.com>
@ 2011-04-06 21:43 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2011-04-06 21:43 UTC (permalink / raw)
To: Ian.Campbell
Cc: Jeremy.Fitzhardinge, konrad.wilk, netdev, virtualization,
xen-devel
From: Ian Campbell <Ian.Campbell@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@treblig.org>
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Applied to net-next-2.6, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-04-06 21:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-03 21:32 Signed bit field; int have_hotplug_status_watch:1 Dr. David Alan Gilbert
2011-04-04 8:26 ` Ian Campbell
[not found] ` <1301905584.23887.49.camel@zakaz.uk.xensource.com>
2011-04-06 21:43 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox