diff options
author | Dan Carpenter <error27@gmail.com> | 2010-06-17 08:08:47 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-06-18 18:33:57 -0400 |
commit | 594578979d0e25e178e0243eca9aa53499b89b05 (patch) | |
tree | 3b1637e4842b85701bbad42471dd239cf68a3040 /drivers | |
parent | 25ebc2f42b07d5aab3b336f5970b8d52b00dd3e2 (diff) |
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')
-rw-r--r-- | drivers/staging/wlan-ng/hfa384x_usb.c | 12 |
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 a41db5dc8c7..563017aaa36 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) | |||
2805 | 2805 | ||
2806 | spin_lock_irqsave(&hw->ctlxq.lock, flags); | 2806 | spin_lock_irqsave(&hw->ctlxq.lock, flags); |
2807 | 2807 | ||
2808 | if (!hw->wlandev->hwremoved && | 2808 | if (!hw->wlandev->hwremoved) { |
2809 | /* Note the bitwise OR, not the logical OR. */ | 2809 | int sched; |
2810 | (!test_and_set_bit(WORK_TX_HALT, &hw->usb_flags) | | 2810 | |
2811 | !test_and_set_bit(WORK_RX_HALT, &hw->usb_flags))) { | 2811 | sched = !test_and_set_bit(WORK_TX_HALT, &hw->usb_flags); |
2812 | schedule_work(&hw->usb_work); | 2812 | sched |= !test_and_set_bit(WORK_RX_HALT, &hw->usb_flags); |
2813 | if (sched) | ||
2814 | schedule_work(&hw->usb_work); | ||
2813 | } | 2815 | } |
2814 | 2816 | ||
2815 | spin_unlock_irqrestore(&hw->ctlxq.lock, flags); | 2817 | spin_unlock_irqrestore(&hw->ctlxq.lock, flags); |