Received: by 2002:a05:7412:bc1a:b0:d7:7d3a:4fe2 with SMTP id ki26csp1001474rdb; Sun, 20 Aug 2023 12:16:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHOYIV9eMt9jEO4ysGDXhZeiSaH3Ld4Z1pozFWYEEMaqR76TR08dKb0FOA+WrY/udfsv8UR X-Received: by 2002:a05:6a00:1501:b0:675:70d7:1eb4 with SMTP id q1-20020a056a00150100b0067570d71eb4mr3550627pfu.14.1692559004764; Sun, 20 Aug 2023 12:16:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692559004; cv=none; d=google.com; s=arc-20160816; b=rfeapmAsuqsxFqZ2Bo5PGyspeprnxL0wWacU3/e1PeajRtJ8gs0mpOAxXWaVJ3u4lH HigbTFCtjJvKr++ee3NNkzPsEfQsFYNGP+qcyc7F64QRfaQukfbCqD5M/H7Bxy8yHCEy /wqyafPFioBTmqo2lcGgQxypzFZuJ9CRGN26MSbxjtCWzYTuJizhakAyeg8T+6k6sgVm Tn49u1q7pVxs1DgnDR5FMe0NiqKrU4pcncvjyvwTTBlphMAPs+RJ1ClBups1qP9vMMUa sVZsSh+wClDnZmUQJwyy9BGY0wnPBpR02lWbRFtkFHUxeTdjIyVI1zdo4VUJ9G/6xNgC lLrg== 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=rFAMZxi9cFPBqoMKelkFM6Mbo5bot7joElk190v+dqY=; fh=k7XzfpyqnKqnwxpqVF0NftrWa2FIpeAcHVbykF5xarA=; b=0ReobmqW0D0AdKMQ1cCFGHN3nmmnCVN0twou0KZPukc0tHXJ0dMvzhWSLfSZxonm0g 9crJPFdxiH59fkMMuLxnbpFXvpwtBdnPD9ZK16prDl05MCzR4MSRSN0LzknQQbjwLVsr dQ7x+epbsKxpBCIL2mJGx+724l4Z86RXzjemptZ4vOKEL/hzdh1GxQifCdNyCa+gzUMU ployoLRo3VcD8V/nU5+EwGRMYiCNmU8/dLMUWc166JQ4tU5j+eZK14wjUxm1S/kW06Sp UJcbIH2iUy0kBaX9D4tfc6t2CNhpwoh95KGqGs8ax5StSNPAb90Bt/Ok9dZPSih9Y9Y9 POnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aXZKDnke; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id h2-20020a635302000000b00565336a3cf5si5866509pgb.491.2023.08.20.12.16.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Aug 2023 12:16:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aXZKDnke; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EFC123702C8; Sat, 19 Aug 2023 12:09:21 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244328AbjHPK7z (ORCPT + 99 others); Wed, 16 Aug 2023 06:59:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244383AbjHPK7n (ORCPT ); Wed, 16 Aug 2023 06:59:43 -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 5F1B4269E; Wed, 16 Aug 2023 03:59:17 -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 53BCB665C0; Wed, 16 Aug 2023 10:58:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A459BC433CD; Wed, 16 Aug 2023 10:58:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692183511; bh=yNpilYb6nvSQBFaf1Q2HhB1yiFiHFUihCQbVC837jRk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aXZKDnke8YPV4L/5Sg6ATqj0uhgwWkgynBiplScG00iQQmgSWbiS+1b4e4WGKksUW Cd0Vgyf/2aoFVORJA4RrnjiGPOesfIKP84RRyL/AMRjWg2J0owdI7oHPHtzev7d4Xd UE6M/IqZNluHU8CP327O6zelKZ05DSNKO1Pn8+7KFWBphRSZ+Ih+yN/OrEvSdFl6BE oI3tlqble7GnYCNVIiyw6vK2aQBN/DJKgkeHiLX31adWeDppHZTVlSCBaRBVtn/UDf 553e/J0V5RTvoN2aGrV3aaSJg3ivBejpxYKIDlVEzdJg77JWTXmhH6tbHO5WyrBWzw wj86En1V9k2JQ== From: "Jiri Slaby (SUSE)" To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" Subject: [PATCH 02/14] tty: n_tty: use output character directly Date: Wed, 16 Aug 2023 12:58:08 +0200 Message-ID: <20230816105822.3685-5-jirislaby@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230816105822.3685-1-jirislaby@kernel.org> References: <20230816105822.3685-1-jirislaby@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 There is no point to use a local variable to store the character when we can pass it directly. This assignment comes from era when we used to do get_user(c, b). We no longer need this, so fix this. Signed-off-by: Jiri Slaby (SUSE) --- drivers/tty/n_tty.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c index 8b2bacb3e40d..f6fa4dbdf78f 100644 --- a/drivers/tty/n_tty.c +++ b/drivers/tty/n_tty.c @@ -2373,8 +2373,7 @@ static ssize_t n_tty_write(struct tty_struct *tty, struct file *file, nr -= num; if (nr == 0) break; - c = *b; - if (process_output(c, tty) < 0) + if (process_output(*b, tty) < 0) break; b++; nr--; } -- 2.41.0