[PATCH] MTD: use unsigned 1-bit fields

Randy.Dunlap rddunlap at osdl.org
Wed Feb 16 19:06:45 EST 2005


since a 1-bit field cannot hold a truth value and a sign bit.

Fix (22) bitfield/boolean sparse warnings:
include/linux/mtd/flashchip.h:65:23: warning: dubious one-bit signed bitfield
include/linux/mtd/flashchip.h:66:23: warning: dubious one-bit signed bitfield

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

diffstat:=
 include/linux/mtd/flashchip.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -Naurp ./include/linux/mtd/flashchip.h~mtd_flashchip_bool ./include/linux/mtd/flashchip.h
--- ./include/linux/mtd/flashchip.h~mtd_flashchip_bool	2005-02-15 13:48:46.633263712 -0800
+++ ./include/linux/mtd/flashchip.h	2005-02-15 20:25:20.924981544 -0800
@@ -62,8 +62,8 @@ struct flchip {
 	flstate_t state;
 	flstate_t oldstate;
 
-	int write_suspended:1;
-	int erase_suspended:1;
+	unsigned int write_suspended:1;
+	unsigned int erase_suspended:1;
 	unsigned long in_progress_block_addr;
 
 	spinlock_t *mutex;


---




More information about the linux-mtd mailing list