Received: by 2002:a05:6358:51dd:b0:131:369:b2a3 with SMTP id 29csp854387rwl; Thu, 10 Aug 2023 02:40:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHskopJMIgQZqPTKMJVSMRGOKdokhvBhlB9JYiQc2CV26O5S8mzMXnFvpPywyqlgKasX7lC X-Received: by 2002:a05:6358:9487:b0:135:99fa:a118 with SMTP id i7-20020a056358948700b0013599faa118mr2711095rwb.4.1691660455845; Thu, 10 Aug 2023 02:40:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691660455; cv=none; d=google.com; s=arc-20160816; b=IrJEOoAA3TeFtEDyNFiAUpu9IbCQiL6/kevSAJzr8R2YRqc9/4dYxbjre5Xkiefk9w d0R/bfgLNxfvSWO90+tPqpnyV+G7akIQmODeqxHRCO+5ldX1dY1Wt12aIbHlSRSz1uNW JChDKt8XvTPKFZpisENM+762GUPYt3btQTDKCp0GEvO8Xrm5Jf9fiWRUfPeqRGdMQAOL 2NA7Ig6vXLDzKPavSofUoPIdK92OamyC1L4AO2wZWI0m1KyQPxNblKZD1US+T/TgYBPw wC1qPjOf+muEGeeol+N4wlphNGc5ULKyC9QQcaA7/jLurhP0X2IrSv99BvSqhbJ7ZQxq IMcQ== 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=awlYgBFndNGxHrdPUr4kVpbCFFNPTMA+fBzzz7mm2mE=; fh=k7XzfpyqnKqnwxpqVF0NftrWa2FIpeAcHVbykF5xarA=; b=hvzG02LIK9xEK3GVtEbdi+QdjzAhIPrchYTIaFKyU4m1e1jfQQiZ746tCi0EFhqLIJ KrwZuvyrVq0qG9YK50y2TMIb3WT9WsvY2MRg123068/CUpAHmIREe6n3olcPmH5P1LFk bT/svxlth47RzTjwuS3wXP/OzrsXe5fQh/GIpBNZ8azLYNVDIX+wUrCzmNr0KWWnUgUv 0aomeSRFxo05ukWbRUa0GNMyuT82e2kcc8h4pXPAlS6muh68+Gaiz8yMGK8vB8fFrp+/ dNOtxBUNO4m/exjfGw0DjyRHKat/66UUX2gflhymVskbqMOyqltU9BqJ8ubFu8PP7IOG Dyxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SYhUujNS; 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 bk13-20020a056a02028d00b005653283b8a4si1253318pgb.785.2023.08.10.02.40.43; Thu, 10 Aug 2023 02:40:55 -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=SYhUujNS; 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 S234670AbjHJJR2 (ORCPT + 99 others); Thu, 10 Aug 2023 05:17:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232905AbjHJJQq (ORCPT ); Thu, 10 Aug 2023 05:16:46 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9316D3C14; Thu, 10 Aug 2023 02:16:07 -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 25F3C654DE; Thu, 10 Aug 2023 09:16:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7991DC433C8; Thu, 10 Aug 2023 09:16:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691658966; bh=euey0Vwb3a38bJF9s54Px8Eo2t3YYbZQXNTfdlimNNE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SYhUujNShSvPoCZg1A330pYO2y4KLWg5zUF3UcFqDQmKRIZTIsQfouWQ2XgN+Osh+ gLqXYroH9rJg0QVfOx7VKkGW+ef0ShuK5cACEGRusmkaXeZKJcu/RQrx6ihWI3D17B mApX9X8IYDdfYThdoAdG5AXkNsYif78felO1kF3BsSHBBcNh4wA7dc87Y82dWrLdle EVfekKLhcBD3ZREvf0g4tsr/bIap01iGz/wSjRrBL0TWO+oLkpkp6/XQidgeIuk1Wy ZopyOwELptjcTzsCcmXWN8ei4DrElJI2SZ2S1gjCl+W1t/VWJD6x5OqEOCLassN10N IEhjc9eNafX0g== From: "Jiri Slaby (SUSE)" To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" Subject: [PATCH 22/36] tty: rename and de-inline do_tty_write() Date: Thu, 10 Aug 2023 11:14:56 +0200 Message-ID: <20230810091510.13006-23-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 Make do_tty_write()'s name sound similar to iterate_tty_read(). They both do similar things, so there is no reason for so distinct names. The new name is therefore iterate_tty_write(). Drop the unnedeed inline modifier too. Let the compiler decide. Signed-off-by: Jiri Slaby (SUSE) --- drivers/tty/tty_io.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index ea5041fbbf28..846460c02c58 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -961,8 +961,8 @@ int tty_write_lock(struct tty_struct *tty, bool ndelay) * Split writes up in sane blocksizes to avoid * denial-of-service type attacks */ -static inline ssize_t do_tty_write(struct tty_ldisc *ld, struct tty_struct *tty, - struct file *file, struct iov_iter *from) +static ssize_t iterate_tty_write(struct tty_ldisc *ld, struct tty_struct *tty, + struct file *file, struct iov_iter *from) { size_t count = iov_iter_count(from); ssize_t ret, written = 0; @@ -1090,7 +1090,7 @@ static ssize_t file_tty_write(struct file *file, struct kiocb *iocb, struct iov_ if (!ld->ops->write) ret = -EIO; else - ret = do_tty_write(ld, tty, file, from); + ret = iterate_tty_write(ld, tty, file, from); tty_ldisc_deref(ld); return ret; } -- 2.41.0