diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00reg.h')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00reg.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00reg.h b/drivers/net/wireless/rt2x00/rt2x00reg.h index 7e88ce5651b9..2ea7866abd5d 100644 --- a/drivers/net/wireless/rt2x00/rt2x00reg.h +++ b/drivers/net/wireless/rt2x00/rt2x00reg.h | |||
@@ -136,7 +136,7 @@ struct rt2x00_field32 { | |||
136 | */ | 136 | */ |
137 | #define is_power_of_two(x) ( !((x) & ((x)-1)) ) | 137 | #define is_power_of_two(x) ( !((x) & ((x)-1)) ) |
138 | #define low_bit_mask(x) ( ((x)-1) & ~(x) ) | 138 | #define low_bit_mask(x) ( ((x)-1) & ~(x) ) |
139 | #define is_valid_mask(x) is_power_of_two(1 + (x) + low_bit_mask(x)) | 139 | #define is_valid_mask(x) is_power_of_two(1LU + (x) + low_bit_mask(x)) |
140 | 140 | ||
141 | /* | 141 | /* |
142 | * Macro's to find first set bit in a variable. | 142 | * Macro's to find first set bit in a variable. |
@@ -173,8 +173,7 @@ struct rt2x00_field32 { | |||
173 | * does not exceed the given typelimit. | 173 | * does not exceed the given typelimit. |
174 | */ | 174 | */ |
175 | #define FIELD_CHECK(__mask, __type) \ | 175 | #define FIELD_CHECK(__mask, __type) \ |
176 | BUILD_BUG_ON(!__builtin_constant_p(__mask) || \ | 176 | BUILD_BUG_ON(!(__mask) || \ |
177 | !(__mask) || \ | ||
178 | !is_valid_mask(__mask) || \ | 177 | !is_valid_mask(__mask) || \ |
179 | (__mask) != (__type)(__mask)) \ | 178 | (__mask) != (__type)(__mask)) \ |
180 | 179 | ||