From patchwork Thu Aug 10 09:15:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 712538 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8476C001B0 for ; Thu, 10 Aug 2023 09:18:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234893AbjHJJS6 (ORCPT ); Thu, 10 Aug 2023 05:18:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234907AbjHJJSG (ORCPT ); Thu, 10 Aug 2023 05:18:06 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2803A30DB; Thu, 10 Aug 2023 02:16:43 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 30A1B654F7; Thu, 10 Aug 2023 09:16:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0130FC433CB; Thu, 10 Aug 2023 09:16:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691659001; bh=EAzZvqV0DX/6MdQG6V3byUfhXhjqmaV2PFwGoLqDg8Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Gkoej6iSFauNlE7dWSTp1xK+Zil0fHVbrGDyfXRIZcijG+8mFqs2KZCGDVZk1BNIg 2BrkFE3DAyzqQBjSzwWnPHgT7lHoDPYh93Zvnvb2knmm72I3zNXWyiCbTQz7nRxzyc c1gn51OWjpJvxPhVY+qxUSfMoPktrsWQPxaJeYlQPVdxqw2ByFU7E2Zu2QFOOMsCqm iEJu0oUE+1M0zV7e5YclMNchhoe72pqshhn9Xg0meohMdAK6zy0R8a/OXG7OskOXcy eYLZGtok45f5+lS0LYVZXOCfiiDUzdgwarHg7S+zdd6Dqp+1PbS0iK6E3PkM99+et0 G0Qm8ToQVqDGA== From: "Jiri Slaby (SUSE)" To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz Subject: [PATCH 36/36] tty: rfcomm: convert counts to size_t Date: Thu, 10 Aug 2023 11:15:10 +0200 Message-ID: <20230810091510.13006-37-jirislaby@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230810091510.13006-1-jirislaby@kernel.org> References: <20230810091510.13006-1-jirislaby@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org Unify the type of tty_operations::write() counters with the 'count' parameter. I.e. use size_t for them. Signed-off-by: Jiri Slaby (SUSE) Cc: Marcel Holtmann Cc: Johan Hedberg Cc: Luiz Augusto von Dentz --- net/bluetooth/rfcomm/tty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c index 33b135ed59c4..94ec913dfb76 100644 --- a/net/bluetooth/rfcomm/tty.c +++ b/net/bluetooth/rfcomm/tty.c @@ -785,12 +785,12 @@ static ssize_t rfcomm_tty_write(struct tty_struct *tty, const u8 *buf, struct rfcomm_dev *dev = tty->driver_data; struct rfcomm_dlc *dlc = dev->dlc; struct sk_buff *skb; - int sent = 0, size; + size_t sent = 0, size; BT_DBG("tty %p count %zu", tty, count); while (count) { - size = min_t(uint, count, dlc->mtu); + size = min_t(size_t, count, dlc->mtu); skb = rfcomm_wmalloc(dev, size + RFCOMM_SKB_RESERVE, GFP_ATOMIC); if (!skb)