Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4094777rdb; Mon, 11 Dec 2023 08:40:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IFTqgsdnOi7MSEqXJofNJ5FX0OFRFAtltpR9iC/pR+GgOZzUoJuc+nb+ArdncPBimVev/gR X-Received: by 2002:a17:90a:d90c:b0:286:8ae4:3df2 with SMTP id c12-20020a17090ad90c00b002868ae43df2mr1735260pjv.57.1702312840041; Mon, 11 Dec 2023 08:40:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702312840; cv=none; d=google.com; s=arc-20160816; b=QC36BQ7TmirwUSR5+Hs8TjyrHeED3FkuKuCL2PSIafwRS/cGvfgt1CCuS2TEhsUdmX MYp7UjgqawSXoGeWuUIQRyrZIFWxeFy7S1+lGrB0xxeziupNq5vdoAdsRmEglDWaU5Sn lKvI5UZrnNXaUXAZ0StTmmxZmNb7thApYuHSrznyeK0Z6rn9VuQQGYuwbH2FUcBVi3gG KrcdUl0byWdrcRaouia/qkWSy+2c4nI8X9XEg4AB6kNkv01phjuTPNyQXg3QI9aj+jot 66pWCQfTmSpec8/wh8REzJWqhARRJ9mpHSPWD9YOEYmlKe1RCw+UtWNtc8saQKC+jZ/i R3BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=uktnGffsNuElIqXrv5uNNtaDnxg2hhsda93oCZBQHeM=; fh=7zELYa7M3eZkHcht9ypjLRMdoX+oEuBAivVBmObCxkg=; b=gAuiUTBfGui4do3sKH206JbFim8BzCvLFjv5rqvnKWMKQ0dXqO3SMfCptgsnJ5shxh da7juylhnBsmOPAVJ5xJzUOQwhpafGMsQKQ+d6Eo+Se44yQdb5AGyrBsn1N58tBEhZVJ +AGZtJNEb1smzYEk154rXzj/h3I3oElItQe6QBgJYW7+Gt1fjcBNu2fupXLy9Bm0d/wt Xie7XenZ+yE3X19gLIZQrGgBRViUbgsWU34ueSw6fqRrzfsLqzal+NqBgFMtLTW6eM6y DF9kuN1LXNLDf7v2ng1IZ/DmydbmKx676NTWkY+GDZ4jX2hY/hn7syuDdgtM40oAB4Xf Gttw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth+bounces-519-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-519-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id t23-20020a17090aba9700b00286686b9d9dsi7710555pjr.130.2023.12.11.08.40.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 08:40:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-519-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth+bounces-519-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-519-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 7CDC22819EB for ; Mon, 11 Dec 2023 16:40:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C4BC5321A3; Mon, 11 Dec 2023 16:40:33 +0000 (UTC) X-Original-To: linux-bluetooth@vger.kernel.org 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 Content-Transfer-Encoding: 8bit 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(-) -- 2.25.1