Skip to contentSkip to conversation

Suppress sparse message about keyidx - make it signed

PATCH New Pavel Roskin 1 participant 1 message Feb 24, 2007 Networking

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Suppress sparse message about keyidx - make it signed

sparse reports:
error: dubious bitfield without explicit signed' or unsigned'

keyidx should be signed for consistency with definitions in d80211.h, and it doesn't need to be a bitfield - s8 would do the right thing. Reorder the fields to keep the one-bit flags together.

---

 net/d80211/ieee80211_key.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/d80211/ieee80211_key.h +1 -1
index 5b5c564..2889b10 100644
@@ -79,9 +79,9 @@ struct ieee80211_key {
 	/* if the low level driver can provide hardware acceleration it should
 	 * clear this flag */
 	unsigned int force_sw_encrypt:1;
-	int keyidx:8; /* WEP key index */
 	unsigned int default_tx_key:1; /* This key is the new default TX key
 					* (used only for broadcast keys). */
+	s8 keyidx; /* WEP key index */
 
 	u8 key[0];
 };