Received: by 2002:a05:6358:51dd:b0:131:369:b2a3 with SMTP id 29csp850358rwl; Thu, 10 Aug 2023 02:36:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFaM6Y8OhiAfFnYWiz7AWm70DKTz9e0lFUSm19FdEoyxaakAYLpYOYzwMYLhOxgL4wm860L X-Received: by 2002:a05:6830:2050:b0:6bc:f999:188f with SMTP id f16-20020a056830205000b006bcf999188fmr2056861otp.3.1691660161849; Thu, 10 Aug 2023 02:36:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691660161; cv=none; d=google.com; s=arc-20160816; b=kVey4Ui+QXpd8sztBeLSzVWSIsq8d6jzqwxYYwZFPYKBck8YNDhRB/me+ZnDJFTjki XBqQLwhHTlDpvfQQ9L31tuVNDmmG37+Qeihh7bLyjVAtqzBQyiHKzmpsvN/hjgYvEI/Y BDaY+sHD2SuRfnN3SnyfGK6oe/AGavalaKoiK876zXufE9k+Kzl8/8DO8NX9R/f4sN6W nBa/opzt4cnUpo0fgtVGSkp37sgip0MMdE8rPossU52mrs7kQ4wXRd8bctl4CbzrBXrM 3U5YcePUx/r2m0iwIQf6t+Qhsj9+XFR5t46280JeL680Ste3q/6Nu5zorEjwexN4leaW /DHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=40ox8uk0ppXAtGg5x+bIY37m5RABiL4HKHWJlM18PSQ=; fh=Wjt1mIc3jSuNo1Q0DkgiKAo/vOcFTh7LtARh63Gxzgk=; b=b8a/umI97hTwBMqx9eYNe9Ujm7jN1SaBKmiXBn0HzoC7xLlzg0lWSFDfLdLeUDE9v8 2C0pqS5GRJFuqn6Wgv4EU+kavd8z+/axPNU+z2Pxsd+KnKjjEvFZ99k6aG+xGB84d6Ra cM7R3/Ry5DDGTpn92cU85YEhsM2y5OuX4mTHUii5MC5NeFP+z2Dj9ffe2K3gjdNS+Ggl qlR5vNKhEn2IPQYuZRM1mXaqpbStiP4vu/Ve0kDZA/38YkCL8CNbym1qbTs1FDLH5d8O pOJvywdRb7wlxYIDlbEgd+UbiuB839O7wpfk/PeVQeTIAIN/EO1ALv/P73fjoLv2S81t TkeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Gkoej6iS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b26-20020a6567da000000b0053f3b62c207si1195529pgs.767.2023.08.10.02.35.49; Thu, 10 Aug 2023 02:36:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Gkoej6iS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234911AbjHJJS6 (ORCPT + 99 others); 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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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) -- 2.41.0