Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3326746rdh; Mon, 27 Nov 2023 11:14:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IF6N+lwSyfJGEFz8wg2wbf8ERwBvZCC+FWJIZkLIaONGse6jG3xbD1kwrQiMYzUqGo1GH4D X-Received: by 2002:a05:620a:2493:b0:76c:ae1f:201e with SMTP id i19-20020a05620a249300b0076cae1f201emr25086657qkn.27.1701112482769; Mon, 27 Nov 2023 11:14:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701112482; cv=none; d=google.com; s=arc-20160816; b=rfvTQ8jTpb9TPm6p/fAJN8Ls0kXI2HvBAMbPiZXR8o+F0aOzaxF0EecVwFgS6WybAW Ww4RbAK41kvCirrkrH25WMtBzWgxEsU09WugIDl/3Nl6CZ+MmuC89Ap6Kf3sTpktun8M /FSYvGkGcXEBOMIVLXva4rUe6pqGpJKAYyitgEq3D5Snms0U2w5L+vgfs+jDHOFuMVZt QZPHu2moTtDkii2fsQODz6Hd/82sFO7SFdirB0ENMJ2Dp0wxKEtKfWZZzEp7w/duClZp jc2iPgVgcm8LgW+TGTuTaw91gJbSJVVjnOcj1TzKxq9Uu4S/cVcJX0BlEVnpEy3gCnw5 25pQ== 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=r7mxqkkfz9EDoNiMKgQoFx2LrcegfaNSpCMA78jTXPw=; fh=beEZ9mbx/yWP+1YCHInBp7q7GCmnhzpdlHNOdFv0BAk=; b=G9jAgqdUcfOlHTIQYE3Ea4kqHYfVv0UbO3c7k6/2h9v0xl7mN62TvS++LvedSQC71I VXIQlYo2H3bz12OcMguWZxYQB227fZw1oASFL3HAq0YpTC3V3d+brnrmVV0PJDKY55IC TP5Lxf8qz80PahSlnAsYkGCuixclfkMV5lqxI+drcYSqPfzQAh4Ral3t/itYSS3Bud50 umGoLyeloQQvEdcaOHgexxXg62bgv0ckX77NCL+c35K4ksq9z/EKLel6cOJeN9f9wSkM 42+q4SdKzsRDnlzwdnVaIq0Fney8FB/kVhpbnWPAJKfA8GJ2Hl2TN+UMi95pNeQGNGqK DytQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth+bounces-244-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-244-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id dz26-20020a05620a2b9a00b0076d81c85ecesi10059531qkb.723.2023.11.27.11.14.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 11:14:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-244-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth+bounces-244-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-244-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 88DCF1C20B7E for ; Mon, 27 Nov 2023 19:14:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0041F3EA73; Mon, 27 Nov 2023 19:14:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=none 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 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 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. 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