From patchwork Mon Nov 27 19:14:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Francesco Dolcini X-Patchwork-Id: 747636 Authentication-Results: smtp.subspace.kernel.org; dkim=none Received: from mail11.truemail.it (mail11.truemail.it [IPv6:2001:4b7e:0:8::81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA013D5F; Mon, 27 Nov 2023 11:14:31 -0800 (PST) Received: from francesco-nb.corp.toradex.com (31-10-206-125.static.upc.ch [31.10.206.125]) by mail11.truemail.it (Postfix) with ESMTPA id BEC0A206D2; Mon, 27 Nov 2023 20:14:29 +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 , linux-serial@vger.kernel.org Subject: [PATCH v1 0/3] Bluetooth: fix recv_buf() return value Date: Mon, 27 Nov 2023 20:14:05 +0100 Message-Id: <20231127191409.151254-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. 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(-)