Quoting Dan Carpenter <error27@xxxxxxxxx>:
Smatch complains we negate a non-boolean type here: if (!on != aniState->ofdmWeakSigDetectOff) { It's a quite common bug to forget that negation has higher precendence than compare operations. In this case, it's clear from code that "on" is either 1 or 0 so smatch should not complain.
We could rename ofdmWeakSigDetectOff to ofdmWeakSigDetectOn and change the logic appropriately. Positive logic is easier to understand in the long run.
ofdmWeakSigDetectOn could be boolean and "on" could be int, since it's an index. The comparison could use !!on to convert int to boolean.
-- Regards, Pavel Roskin -- 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