mbox series

[v2,0/3] Bluetooth: fix recv_buf() return value

Message ID 20231211164020.173253-1-francesco@dolcini.it (mailing list archive)
Headers show
Series Bluetooth: fix recv_buf() return value | expand

Message

Francesco Dolcini Dec. 11, 2023, 4:40 p.m. UTC
From: Francesco Dolcini <francesco.dolcini@toradex.com>

Serdev recv_buf() callback is supposed to return the amount of bytes consumed, therefore an int in between 0 and count.

Do not return negative number in case of issue, just print an error and return count. This fixes a WARN in ttyport_receive_buf().

In addition to that a small cleanup patch is added on btnxpuart to remove a useless assignment.

v2:
 - improved commit messages

Francesco Dolcini (3):
  Bluetooth: btnxpuart: fix recv_buf() return value
  Bluetooth: btmtkuart: fix recv_buf() return value
  Bluetooth: btnxpuart: remove useless assignment

 drivers/bluetooth/btmtkuart.c | 11 +++--------
 drivers/bluetooth/btnxpuart.c |  8 +++-----
 2 files changed, 6 insertions(+), 13 deletions(-)

Comments

patchwork-bot+bluetooth@kernel.org Dec. 12, 2023, 4:20 p.m. UTC | #1
Hello:

This series was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Mon, 11 Dec 2023 17:40:17 +0100 you wrote:
> From: Francesco Dolcini <francesco.dolcini@toradex.com>
> 
> Serdev recv_buf() callback is supposed to return the amount of bytes consumed, therefore an int in between 0 and count.
> 
> Do not return negative number in case of issue, just print an error and return count. This fixes a WARN in ttyport_receive_buf().
> 
> In addition to that a small cleanup patch is added on btnxpuart to remove a useless assignment.
> 
> [...]

Here is the summary with links:
  - [v2,1/3] Bluetooth: btnxpuart: fix recv_buf() return value
    https://git.kernel.org/bluetooth/bluetooth-next/c/7954bbcdd7ea
  - [v2,2/3] Bluetooth: btmtkuart: fix recv_buf() return value
    https://git.kernel.org/bluetooth/bluetooth-next/c/687d2de93b11
  - [v2,3/3] Bluetooth: btnxpuart: remove useless assignment
    https://git.kernel.org/bluetooth/bluetooth-next/c/99f188d71731

You are awesome, thank you!