From patchwork Mon Dec 11 16:40:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Francesco Dolcini X-Patchwork-Id: 13487664 Received: from mail11.truemail.it (mail11.truemail.it [IPv6:2001:4b7e:0:8::81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D76FD8; Mon, 11 Dec 2023 08:40:27 -0800 (PST) Received: from francesco-nb.pivistrello.it (93-49-2-63.ip317.fastwebnet.it [93.49.2.63]) by mail11.truemail.it (Postfix) with ESMTPA id 1DDDE2075D; Mon, 11 Dec 2023 17:40:25 +0100 (CET) From: Francesco Dolcini 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@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jiri Slaby Subject: [PATCH v2 0/3] Bluetooth: fix recv_buf() return value Date: Mon, 11 Dec 2023 17:40:17 +0100 Message-Id: <20231211164020.173253-1-francesco@dolcini.it> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Francesco Dolcini 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(-)