netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pcnet32: use unsigned 1-bit fields
@ 2004-10-10 22:44 Randy.Dunlap
  2004-10-15 19:26 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Randy.Dunlap @ 2004-10-10 22:44 UTC (permalink / raw)
  To: netdev, jgarzik, tsbogend, brazilnut

[-- Attachment #1: Type: text/plain, Size: 84 bytes --]


1-bit fields should be unsigned.  Keeps sparse happy,
keeps gcc straight.

~Randy


[-- Attachment #2: pcnet32_bits.patch --]
[-- Type: text/x-patch, Size: 1003 bytes --]


Fix sparse warning and tell gcc that 1-bit fields are unsigned.
drivers/net/pcnet32.c:362:21: warning: dubious one-bit signed bitfield

Signed-off-by: Randy Dunlap <rddunlap@osdl.org>

diffstat:=
 drivers/net/pcnet32.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff -Naurp ./drivers/net/pcnet32.c~pcnet_bits ./drivers/net/pcnet32.c
--- ./drivers/net/pcnet32.c~pcnet_bits	2004-08-13 22:36:33.000000000 -0700
+++ ./drivers/net/pcnet32.c	2004-10-10 15:23:07.964797120 -0700
@@ -359,9 +359,9 @@ struct pcnet32_private {
     struct net_device_stats stats;
     char		tx_full;
     int			options;
-    int	shared_irq:1,			/* shared irq possible */
-	dxsuflo:1,			/* disable transmit stop on uflo */
-	mii:1;				/* mii port available */
+    unsigned int	shared_irq:1,	/* shared irq possible */
+			dxsuflo:1,	/* disable transmit stop on uflo */
+			mii:1;		/* mii port available */
     struct net_device	*next;
     struct mii_if_info	mii_if;
     struct timer_list	watchdog_timer;


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-10-15 19:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-10 22:44 [PATCH] pcnet32: use unsigned 1-bit fields Randy.Dunlap
2004-10-15 19:26 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).