Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mac80211: fix sparse warnings/errors

sparse complains about a shadowed variable, which
we can just rename, and lots of stuff if the API
tracer is enabled, so kick out the tracer code in
a sparse run -- the macros just confuse it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Johannes Berg and committed by
John W. Linville
57c9fff3 0b3acfa7

+5 -2
+3
net/mac80211/driver-trace.c
··· 1 1 /* bug in tracepoint.h, it should include this */ 2 2 #include <linux/module.h> 3 3 4 + /* sparse isn't too happy with all macros... */ 5 + #ifndef __CHECKER__ 4 6 #include "driver-ops.h" 5 7 #define CREATE_TRACE_POINTS 6 8 #include "driver-trace.h" 9 + #endif
+2 -2
net/mac80211/iface.c
··· 401 401 402 402 /* APs need special treatment */ 403 403 if (sdata->vif.type == NL80211_IFTYPE_AP) { 404 - struct ieee80211_sub_if_data *vlan, *tmp; 404 + struct ieee80211_sub_if_data *vlan, *tmpsdata; 405 405 struct beacon_data *old_beacon = sdata->u.ap.beacon; 406 406 407 407 /* remove beacon */ ··· 410 410 kfree(old_beacon); 411 411 412 412 /* down all dependent devices, that is VLANs */ 413 - list_for_each_entry_safe(vlan, tmp, &sdata->u.ap.vlans, 413 + list_for_each_entry_safe(vlan, tmpsdata, &sdata->u.ap.vlans, 414 414 u.vlan.list) 415 415 dev_close(vlan->dev); 416 416 WARN_ON(!list_empty(&sdata->u.ap.vlans));