Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 59457897 authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman
Browse files

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: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 25ebc2f4
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -2805,10 +2805,12 @@ 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))) {
	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);
	}