Hi Nick Nick Kossifidis schrieb: > 2012/7/29 Thomas Huehn <thomas@xxxxxxxxxxxxxxxxxxxxxxx>: >> Hi Nick, >> >> >>> Anyway if readability is the issue we can just do something like >>> >>> int txpower_halfdb = 0; >>> >>> [...] >>> >>> if(ah->power_level) { >>> txpower_halfdb = ah->power_level * 2; >>> } else { >>> txpower_halfdb = AR5K_TUNE_MAX_TXPOWER; >>> } >>> >>> and then it'll look like this >>> >>> ret = ath5k_hw_txpower(ah, channel, txpower_halfdb); >> > How will we distinguish the case when a user asks for the max power > from the case where we have initialized ah->ah_txpower.txp_requested > to max ? I do not sea any use-case where someone would need this distinction. But if there is such a need, I would rather store this information in a variable (e.g. user_set_power=true) explicitly rather than infer it from fact that our power variable is not initialised. Probably to much of a personal taste than to be considered further I guess. Greetings Thomas -- 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