aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/wlan-ng
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-06-17 14:08:47 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-06-18 15:33:57 -0700
commit594578979d0e25e178e0243eca9aa53499b89b05 (patch)
tree3b1637e4842b85701bbad42471dd239cf68a3040 /drivers/staging/wlan-ng
parentMerge branch 'staging-next' into work (diff)
downloadlinux-dev-594578979d0e25e178e0243eca9aa53499b89b05.tar.xz
linux-dev-594578979d0e25e178e0243eca9aa53499b89b05.zip
Staging: wlan-ng: silence a sparse warning
This doesn't change the behavior. It just silences a sparse warning. drivers/staging/wlan-ng/hfa384x_usb.c:2810:62: warning: dubious: !x | !y The point of the bitwise OR is so that a logical OR could short circuit the second call to test_and_set_bit(). Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/wlan-ng')
-rw-r--r--drivers/staging/wlan-ng/hfa384x_usb.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
index a41db5dc8c7c..563017aaa363 100644
--- a/drivers/staging/wlan-ng/hfa384x_usb.c
+++ b/drivers/staging/wlan-ng/hfa384x_usb.c
@@ -2805,11 +2805,13 @@ void hfa384x_tx_timeout(wlandevice_t *wlandev)
spin_lock_irqsave(&hw->ctlxq.lock, flags);
- if (!hw->wlandev->hwremoved &&
- /* Note the bitwise OR, not the logical OR. */
- (!test_and_set_bit(WORK_TX_HALT, &hw->usb_flags) |
- !test_and_set_bit(WORK_RX_HALT, &hw->usb_flags))) {
- schedule_work(&hw->usb_work);
+ if (!hw->wlandev->hwremoved) {
+ int sched;
+
+ sched = !test_and_set_bit(WORK_TX_HALT, &hw->usb_flags);
+ sched |= !test_and_set_bit(WORK_RX_HALT, &hw->usb_flags);
+ if (sched)
+ schedule_work(&hw->usb_work);
}
spin_unlock_irqrestore(&hw->ctlxq.lock, flags);