Staging: rtl8192e: Avoid using bool structure members
PATCH 2/2 Staging: rtl8192e: Avoid using bool structure members
Use 'u8' with bitfield instead of 'bool' to avoid alignment issues and remove checkpatch.pl check:
CHECK: Avoid using bool structure members because of possible alignment issues
Signed-off-by Bhanusree Pola <[email protected]>
--- drivers/staging/rtl8192e/dot11d.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8192e/dot11d.h +1 -1
@@ -29,7 +29,7 @@ enum dot11d_state {*/ struct rt_dot11d_info { -bool enabled; +u8 enabled:1 ;u16 country_len;u8 country_buffer[MAX_IE_LEN ];
Signature · 1 line
2.17.1
Greg Kroah-Hartman
maintainerQuoted 15 lines · Bhanusree Pola
Use 'u8' with bitfield instead of 'bool' to avoid alignment issues and remove checkpatch.pl check:
CHECK: Avoid using bool structure members because of possible alignment issuesSigned-off-by Bhanusree Pola <[email protected]>--- drivers/staging/rtl8192e/dot11d.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/rtl8192e/dot11d.h +0
-0
drivers/staging/rtl8192e/dot11d.h enum dot11d_state { · line 32
Quoted 5 lines
drivers/staging/rtl8192e/dot11d.h +1
-1@@ -29,7 +29,7 @@ enum dot11d_state {*/ struct rt_dot11d_info { -bool enabled; +u8 enabled:1 ;
Ick, no, that might just have caused a lot more work to have happen to access that variable (think about how a bool is stored and accessed vs. a bitfield).
There's nothing wrong with this bool as-is, I would leave it alone.
thanks,
greg k-h