Re: [PATCH, RFC] Bluetooth: btusb, hci_intel: Fix wait_on_bit_timeout() return value checks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Bart,

On Thu, Aug 11, 2016, Bart Van Assche wrote:
> wait_on_bit_timeout() returns one of the following three values:
> * 0 to indicate success.
> * -EINTR to indicate that a signal has been received;
> * -EAGAIN to indicate timeout;
> Make the wait_on_bit_timeout() callers check for these values.
> This patch has not yet been tested.
> 
> Signed-off-by: Bart Van Assche <bart.vanassche@xxxxxxxxxxx>
> Cc: Marcel Holtmann <marcel@xxxxxxxxxxxx>
> Cc: Gustavo Padovan <gustavo@xxxxxxxxxxx>
> Cc: Johan Hedberg <johan.hedberg@xxxxxxxxx>
> ---
>  drivers/bluetooth/btusb.c     | 5 ++---
>  drivers/bluetooth/hci_intel.c | 6 +++---
>  2 files changed, 5 insertions(+), 6 deletions(-)

Good catch. It seems the API was changed not to return 1 by this commit
(which failed to update any users of of it):

  commit 68985633bccb6066bf1803e316fbc6c1f5b796d6
  Author: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
  Date:   Tue Dec 1 14:04:04 2015 +0100

      sched/wait: Fix signal handling in bit wait helpers

Do you have some doubts about your fix? You put "RFC" in the subject
which usually means the author isn't completely sure about it.

Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux