From patchwork Tue Nov 15 07:17:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 20216 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2565845wru; Mon, 14 Nov 2022 23:20:10 -0800 (PST) X-Google-Smtp-Source: AA0mqf7AlwhL1QNQbbV7puBYIW5/SHc5iNBNDFEzqU5mJ7IHh4T+JXH+3spgefUItQq3buOJmFGn X-Received: by 2002:aa7:de92:0:b0:467:8fb6:d11 with SMTP id j18-20020aa7de92000000b004678fb60d11mr10731048edv.421.1668496810656; Mon, 14 Nov 2022 23:20:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668496810; cv=none; d=google.com; s=arc-20160816; b=yRBRX+MQwJDJHRSkCCkgujDaA+lRzxwYJP8cAmaY3JYjKs5xzblnlP57ihc1pAWOPZ //3HqpOK6wyqo9U37R0vvEznV2SSEu5+ttuRxWcHEE0WjMbTrXEzwWcNl3bnLNXqSCdA Q1yxOxHRIAQ9/2TX0httFakbnaER0LNugu3hairC7Jk5pX46ZAe14acBN4A7/Ooxoovl /fk9borJ/klH463Y4fgNzQ88PlUX4GRqHY4ubriKpdp5TTY1SaZURoldyEdBWWsWoCg3 w1/ayjLrHOAHinLd0pfVoz313NXzbfsKIWM3crhukPNufSDFqD/r9R6IcLeQyvXjeJBO 509g== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=+RCT2yB8h0kWm0nmaHq7MwBFOD3naBENbOD+/8vukmc=; b=kjZfUegyzL4Nc+50/hLhcuiWZ+J0Dj5sBdQ665FpDetL5ZWd8ShQFrrA223FLi5q6/ cXDMh/YfQ+yG46boHeAahqPWxr02Je2KhFu1/i+6F2Ah1lYiwbZ3UrQIRs2aIBOnJdzv g4UQkOyh7gywVukZ7sKt6jne0MG9YgCSWRrEyNCiqEcQaUHZIcwhboumNNMbbvUaN6jL rgoB5c8dCrWT1ETYRTQDIY4Rqk1S9kIp/Fj38kUi36ryvaRjwNM7ZNRU7+Ka8Rq4TXKt WMPR8DbnKdHuyc4e/ipl6zxX6R6GTU1mvK3J8KJV617kw+mlrQMqeQAmP3IdDOXcSQnu KAvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=U2fZHfaN; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i3-20020a05640242c300b0045c7611d8ddsi11796418edc.179.2022.11.14.23.19.45; Mon, 14 Nov 2022 23:20:10 -0800 (PST) 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=U2fZHfaN; 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 S232147AbiKOHRe (ORCPT + 99 others); Tue, 15 Nov 2022 02:17:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229455AbiKOHRb (ORCPT ); Tue, 15 Nov 2022 02:17:31 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB8391DF05; Mon, 14 Nov 2022 23:17:30 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 61D36B816D4; Tue, 15 Nov 2022 07:17:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B151BC433D6; Tue, 15 Nov 2022 07:17:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668496648; bh=4+/EQQYq7onpYQWLzcvcEdnGKo/7iYZ/uL0MrdW6F24=; h=From:To:Cc:Subject:Date:From; b=U2fZHfaNEO1BH3jEhS2mhHKTOSJgcQ5Icu5Qu1JDBg9q4iyq4KiQcyVszU7pARyZm 0tD8X4lqMzghdB8FOYY49ZZDYpElPIk5RxW0JeDQbFgXOz/GSG8EfQSxsxNR0xCRIE eKuIrF3F/YV+nb9W9gjAuWze/9Ko/uIyCzCwQEVVvm5n5dwtI6mPi83j1/uII2PNAS 1i65qXsclBHab/uLWk1tA08agPVljXyBht/wHtw4zSk71Boqu+Fgwz4K3WNIzTBhS1 38c0ULOo5HZu1v+qpJs8eLG6ih5mRahawUFqcDN3/Vb+KNhBV8ZYG8lZ3bJezyxe0O AOZ54uzpS2FEA== From: "Jiri Slaby (SUSE)" To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Tobias Klauser Subject: [PATCH 1/4] tty: serial: altera_jtaguart: remove flag from altera_jtaguart_rx_chars() Date: Tue, 15 Nov 2022 08:17:21 +0100 Message-Id: <20221115071724.5185-1-jirislaby@kernel.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749545712053608136?= X-GMAIL-MSGID: =?utf-8?q?1749545712053608136?= TTY_NORMAL is the only value it contains, so remove the variable and use the constant instead. Cc: Tobias Klauser Signed-off-by: Jiri Slaby (SUSE) Reviewed-by: Tobias Klauser --- drivers/tty/serial/altera_jtaguart.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serial/altera_jtaguart.c b/drivers/tty/serial/altera_jtaguart.c index aa49553fac58..8d1729711584 100644 --- a/drivers/tty/serial/altera_jtaguart.c +++ b/drivers/tty/serial/altera_jtaguart.c @@ -126,18 +126,17 @@ static void altera_jtaguart_set_termios(struct uart_port *port, static void altera_jtaguart_rx_chars(struct altera_jtaguart *pp) { struct uart_port *port = &pp->port; - unsigned char ch, flag; + unsigned char ch; unsigned long status; while ((status = readl(port->membase + ALTERA_JTAGUART_DATA_REG)) & ALTERA_JTAGUART_DATA_RVALID_MSK) { ch = status & ALTERA_JTAGUART_DATA_DATA_MSK; - flag = TTY_NORMAL; port->icount.rx++; if (uart_handle_sysrq_char(port, ch)) continue; - uart_insert_char(port, 0, 0, ch, flag); + uart_insert_char(port, 0, 0, ch, TTY_NORMAL); } tty_flip_buffer_push(&port->state->port);