Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1432798 > unrolled thread
| Started by | Johannes Berg <johannes@sipsolutions.net> |
|---|---|
| First post | 2016-06-28 12:50 +0200 |
| Last post | 2016-06-28 12:50 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] nl80211: improve nl80211_parse_mesh_config type checking Johannes Berg <johannes@sipsolutions.net> - 2016-06-28 12:50 +0200
| From | Johannes Berg <johannes@sipsolutions.net> |
|---|---|
| Date | 2016-06-28 12:50 +0200 |
| Subject | Re: [PATCH] nl80211: improve nl80211_parse_mesh_config type checking |
| Message-ID | <rOYKD-5Nk-59@gated-at.bofh.it> |
On Wed, 2016-06-15 at 22:29 +0200, Arnd Bergmann wrote: > When building a kernel with W=1, the nl80211.c file causes a number > of > warnings, all about the same problem: > > net/wireless/nl80211.c: In function 'nl80211_parse_mesh_config': > net/wireless/nl80211.c:5287:103: error: comparison is always false > due to limited range of data type [-Werror=type-limits] > net/wireless/nl80211.c:5290:96: error: comparison is always false due > to limited range of data type [-Werror=type-limits] > net/wireless/nl80211.c:5293:124: error: comparison is always false > due to limited range of data type [-Werror=type-limits] > net/wireless/nl80211.c:5295:148: error: comparison is always false > due to limited range of data type [-Werror=type-limits] > net/wireless/nl80211.c:5298:106: error: comparison is always false > due to limited range of data type [-Werror=type-limits] > net/wireless/nl80211.c:5305:116: error: comparison is always false > due to limited range of data type [-Werror=type-limits] > > The problem is that gcc does not notice that the check is generate > by a macro, so it complains about comparing an unsigned type against > 0. > > I've tried to come up with a way to rephrase that code in a way that > avoids the warnings and otherwise improves the code as well. > > This uses a set of new helper functions that perform the range > checking, > and should provide slightly better type safety than the older patch, > at the expense of adding 44 lines to the code. Binary code size is > basically unchanged though (20 bytes added to 126561 bytes .text). > Applied. johannes
Back to top | Article view | linux.kernel
csiph-web