public inbox for linux-mediatek@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v1 0/3] Bluetooth: fix recv_buf() return value
@ 2023-11-27 19:14 Francesco Dolcini
  2023-11-27 19:14 ` [PATCH v1 2/3] Bluetooth: btmtkuart: " Francesco Dolcini
  2023-11-27 19:23 ` [PATCH v1 0/3] Bluetooth: " Francesco Dolcini
  0 siblings, 2 replies; 4+ messages in thread
From: Francesco Dolcini @ 2023-11-27 19:14 UTC (permalink / raw)
  To: Sean Wang, Marcel Holtmann, Johan Hedberg, Luiz Augusto von Dentz,
	Matthias Brugger, AngeloGioacchino Del Regno, Amitkumar Karwar,
	Neeraj Kale
  Cc: Francesco Dolcini, linux-bluetooth, linux-mediatek, linux-kernel,
	linux-arm-kernel, Jiri Slaby, linux-serial

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.

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(-)

-- 
2.25.1



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-11-28  5:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-27 19:14 [PATCH v1 0/3] Bluetooth: fix recv_buf() return value Francesco Dolcini
2023-11-27 19:14 ` [PATCH v1 2/3] Bluetooth: btmtkuart: " Francesco Dolcini
2023-11-27 19:23 ` [PATCH v1 0/3] Bluetooth: " Francesco Dolcini
2023-11-28  5:17   ` Jiri Slaby

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox