Re: [PATCH] staging: rtl8192u: simplify conditional statement

From: kbuild test robot
Date: Thu Oct 15 2015 - 11:16:40 EST


Hi Luis,

[auto build test WARNING on staging/staging-next -- if it's inappropriate base, please suggest rules for selecting the more suitable base]

url: https://github.com/0day-ci/linux/commits/Luis-de-Bethencourt/staging-rtl8192u-simplify-conditional-statement/20151015-203425
config: i386-allmodconfig (attached as .config)
reproduce:
# save the attached .config to linux build tree
make ARCH=i386

All warnings (new ones prefixed by >>):

drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c: In function 'ieee80211_softmac_scan_syncro_rsl':
>> drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:469:19: warning: comparison of constant '5' with boolean expression is always false [-Wbool-compare]
if(!ieee->state > IEEE80211_LINKED && ieee->sync_scan_hurryup)
^
>> drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:469:19: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]

vim +/5 +469 drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c

453 * new network events, despite for updating the net list,
454 * but we are temporarly 'unlinked' as the driver shall
455 * not filter RX frames and the channel is changing.
456 * So the only situation in witch are interested is to check
457 * if the state become LINKED because of the #1 situation
458 */
459
460 if (ieee->state == IEEE80211_LINKED)
461 goto out;
462 ieee->set_chan(ieee->dev, ch);
463 if(channel_map[ch] == 1)
464 ieee80211_send_probe_requests(ieee);
465
466 /* this prevent excessive time wait when we
467 * need to wait for a syncro scan to end..
468 */
> 469 if(!ieee->state > IEEE80211_LINKED && ieee->sync_scan_hurryup)
470 goto out;
471
472
473 msleep_interruptible_rsl(IEEE80211_SOFTMAC_SCAN_TIME);
474
475 }
476 out:
477 if(ieee->state < IEEE80211_LINKED){

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: Binary data