Skip to contentSkip to conversation

ide: make 1-bit fields unsigned

PATCH Applied Randy.Dunlap 2 participants 2 messages Feb 16, 2005 – Feb 24, 2005 libata

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ide: make 1-bit fields unsigned

It's a bit difficult to have a value and a sign bit in a 1-bit field.

Fix (90) boolean/bitfield sparse warnings:
include/linux/ide.h:937:18: warning: dubious one-bit signed bitfield include/linux/ide.h:939:17: warning: dubious one-bit signed bitfield

diffstat:=

 include/linux/ide.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
include/linux/ide.h renamed from include/linux/ide.h~ide_bool +2 -2
diff -Naurp ./include/linux/ide.h~ide_bool ./include/linux/ide.h
@@ -934,9 +934,9 @@ typedef struct hwgroup_s {
 		/* BOOL: protects all fields below */
 	volatile int busy;
 		/* BOOL: wake us up on timer expiry */
-	int sleeping	: 1;
+	unsigned int sleeping	: 1;
 		/* BOOL: polling active & poll_timeout field valid */
-	int polling	: 1;
+	unsigned int polling	: 1;
 		/* current drive */
 	ide_drive_t *drive;
 		/* ptr to current hwif in linked-list */

---