On Thu, 2013-11-07 at 11:47 +1100, Julian Calaby wrote: > >>> - switch (__regulatory_hint(wiphy, reg_request)) { > >>> + switch (reg_request->initiator) { > >>> + case NL80211_REGDOM_SET_BY_CORE: > >>> + reg_process_hint_core(reg_request); > >>> + return; > > > > Note that for the core request we bail out early. > > > >>> + case NL80211_REGDOM_SET_BY_USER: > >>> + case NL80211_REGDOM_SET_BY_DRIVER: > >>> + case NL80211_REGDOM_SET_BY_COUNTRY_IE: > >>> + treatment = __regulatory_hint(wiphy, reg_request); > >>> + break; > >>> + } > >>> + > >>> + switch (treatment) { > >> > >> is used uninitialized here > > > > As I see it in the code we either bail early or its assigned to the > > return value of __regulatory_hint() for the non-core case. Did I miss > > something? > > I think Johannes just wants you to assign something to it so that > paranoid static checkers / compilers won't complain that it's unset in > the potential case where we make it through the switch without hitting > any of the cases. (Adding a default: case to the switch statement > would also work, but as you've been very very careful to spell out all > the cases here that'd tempt developers to remove all the careful > spelling out in some crazed cleanup binge.) > > Of course this will never happen if reg_request->initiator is an enum > and all it's possible values are covered in the switch statement, but > some compilers (and developers like me) need it spelled out for them. Well actually I was just careless and didn't realize that it was actually a false compiler warning :) johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html