Skip to contentSkip to conversation

cpuidle: unsigned bitfield

PATCH Applied [email protected] 2 participants 2 messages Mar 27, 2007 – Mar 29, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 3/4 cpuidle: unsigned bitfield

From: Randy Dunlap <[email protected]>

A 1-bit bitfield has no room for a sign bit.
drivers/cpuidle/governors/ladder.c:54:16: error: dubious bitfield without explicit signed' or unsigned'

---

 drivers/cpuidle/governors/ladder.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cpuidle/governors/ladder.c renamed from drivers/cpuidle/governors/ladder.c~cpuidle-unsigned-bitfield +1 -1
diff -puN drivers/cpuidle/governors/ladder.c~cpuidle-unsigned-bitfield drivers/cpuidle/governors/ladder.c
@@ -51,7 +51,7 @@ struct ladder_device_state {
 
 struct ladder_device {
 	struct ladder_device_state states[CPUIDLE_STATE_MAX];
-	int bm_check:1;
+	unsigned int bm_check:1;
 	unsigned long bm_check_timestamp;
 	unsigned long bm_activity; /* FIXME: bm activity should be global */
 	int last_state_idx;

_

reviewer Applied
#1 lore raw

applied

thanks,
-len

Quoted 32 lines · On Tuesday 27 March 2007 01:38, [email protected] wrote:

From: Randy Dunlap <[email protected]>

A 1-bit bitfield has no room for a sign bit.
drivers/cpuidle/governors/ladder.c:54:16: error: dubious bitfield without explicit signed' or unsigned'

---

 drivers/cpuidle/governors/ladder.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/cpuidle/governors/ladder.c~cpuidle-unsigned-bitfield drivers/cpuidle/governors/ladder.c

drivers/cpuidle/governors/ladder.c renamed from drivers/cpuidle/governors/ladder.c~cpuidle-unsigned-bitfield +1 -1
@@ -51,7 +51,7 @@ struct ladder_device_state {
 
 struct ladder_device {
 	struct ladder_device_state states[CPUIDLE_STATE_MAX];
-	int bm_check:1;
+	unsigned int bm_check:1;
 	unsigned long bm_check_timestamp;
 	unsigned long bm_activity; /* FIXME: bm activity should be global */
 	int last_state_idx;

_
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html