Skip to content

Commit

Permalink
UBI: fix sparse errors in ubi.h
Browse files Browse the repository at this point in the history
In C, signed 1-bit bitfields can only take the values 0 and -1, only 0 and 1
are ever assigned in current code.  Make them unsigned bitfields.

Fixes the (repeated) sparse errors:
drivers/mtd/ubi/ubi.h:220:15: error: dubious one-bit signed bitfield
drivers/mtd/ubi/ubi.h:221:17: error: dubious one-bit signed bitfield
drivers/mtd/ubi/ubi.h:222:18: error: dubious one-bit signed bitfield
drivers/mtd/ubi/ubi.h:223:16: error: dubious one-bit signed bitfield
drivers/mtd/ubi/ubi.h:224:20: error: dubious one-bit signed bitfield

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Artem Bityutskiy <dedekind@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
  • Loading branch information
Harvey Harrison authored and Artem Bityutskiy committed Mar 4, 2008
1 parent 19cd7b7 commit 8eee9f1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/mtd/ubi/ubi.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,11 @@ struct ubi_volume {
void *upd_buf;

int *eba_tbl;
int checked:1;
int corrupted:1;
int upd_marker:1;
int updating:1;
int changing_leb:1;
unsigned int checked:1;
unsigned int corrupted:1;
unsigned int upd_marker:1;
unsigned int updating:1;
unsigned int changing_leb:1;

#ifdef CONFIG_MTD_UBI_GLUEBI
/*
Expand Down

0 comments on commit 8eee9f1

Please sign in to comment.