]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211/minstrel: fix !x!=0 confusion
authorJiri Slaby <jslaby@suse.cz>
Thu, 19 Feb 2015 11:57:40 +0000 (12:57 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 24 Feb 2015 20:12:07 +0000 (21:12 +0100)
commitd3a05d1052ef8246eb6863d85c574b864e6e3f45
tree25778e5b0907de021fe614b75fb44549e1b43ff7
parent4ed0af8eea2c75095b9923540ce6d7e827f5e4f6
mac80211/minstrel: fix !x!=0 confusion

Commit 8e5e7da8d0c1 ("mac80211/minstrel: use the new rate control API")
inverted the condition 'if (msr->sample_limit != 0)' to
'if (!msr->sample_limit != 0)'. But it is confusing both to people and
compilers (gcc5):
net/mac80211/rc80211_minstrel.c: In function 'minstrel_get_rate':
net/mac80211/rc80211_minstrel.c:376:26: warning: logical not is only applied to the left hand side of comparison
   if (!msr->sample_limit != 0)
                          ^

Let there be only 'if (!msr->sample_limit)'.

Fixes: 8e5e7da8d0c1 ("mac80211/minstrel: use the new rate control API")
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/rc80211_minstrel.c