Message ID | 20221112212125.448824-9-gsomlo@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1432571wru; Sat, 12 Nov 2022 13:23:57 -0800 (PST) X-Google-Smtp-Source: AA0mqf7NkAutHCOaqK8fFkh2YqXzTWaYKlOHr1e9lgpkTut+qSVg2BcokAeevAqytpuXHBUw+biE X-Received: by 2002:a50:fa87:0:b0:467:4a80:719b with SMTP id w7-20020a50fa87000000b004674a80719bmr6659089edr.174.1668288237224; Sat, 12 Nov 2022 13:23:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668288237; cv=none; d=google.com; s=arc-20160816; b=kYqHZIqYbadAUUb2m248nfLYsQi9cDY95IgtuC5lZ2u3YN7ffOMTwZfNl1X11v95nt aKGmMUvBUlZklbxG8s6IaaVAgFSuTSa8vKjj4cFOILmCc2p1ZemI8SQPDVepSC6w/G80 /8wEVEsy4NNfSaNda1euOn4oAm/VrKF3mTpTOnnfEbWy68cXCauxOd2sARJ5GOWEYFKO Y0mSh1Z1uHzVIRN1IsDs/ejBnvXZ19RkmkfTRUSDpm/5O1JWwQ4wCZzWQr8knJtpMAdl aFB6nyWWRzPWcDxUh3Hr3T4Lat13Lq6meKdg9ZVzE1a1OtHAnjThutmRAWX3c912y4DD 3r1w== 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=ysSI5FqkSkAdCqfOrlzY0olMSzKAxmyo3p2qEMQhEV8=; b=sbMuQJosU3/HM0lgULZfRFiTWj1YGS0uPuh5RX/e/ibAS0yKdqxl2bE4KgdmI3F+0Z t4ZzSD4NQOJCpkyuMasGms3gJyAnGk8eIdeb0lF1ms/rhC/SGOQ2cg1JAay7p5ib5v0T GggSoHZXlFmfYgBOPqqJ+PsOF+TkePo5dgiKiUw6bNaWJEROVzmYJr5MmHkSxyR9GUZ5 j8X1tNs37IN55OlmNypsBxnloFH0OsP6Nuw4j5MdVT9AOmJtzGHQH22DzHIl7J1daNKn bA28XNH+/G7+l0hh3iF74bMe6WcLoSmE3TmQM88NqO7aHAQmdha6W4ABWNnj0LLTqvvG aXzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ZeyUCP31; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ds5-20020a170907724500b0078d4962a32asi6147294ejc.961.2022.11.12.13.23.32; Sat, 12 Nov 2022 13:23:57 -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=@gmail.com header.s=20210112 header.b=ZeyUCP31; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235092AbiKLVWE (ORCPT <rfc822;winker.wchi@gmail.com> + 99 others); Sat, 12 Nov 2022 16:22:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235096AbiKLVVl (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 12 Nov 2022 16:21:41 -0500 Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71A4115A36; Sat, 12 Nov 2022 13:21:40 -0800 (PST) Received: by mail-qk1-x732.google.com with SMTP id d7so2946169qkk.3; Sat, 12 Nov 2022 13:21:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ysSI5FqkSkAdCqfOrlzY0olMSzKAxmyo3p2qEMQhEV8=; b=ZeyUCP31FCfmExvkf6Z0PI3w/Y3U89wZ6yeeShdpc9LKg74ByWcgDc6K2MlMp+L3vp aBgE7tlx/NrajJNENJ9ZTtfQ10AICFYsDmvDmhMx/P991C/a+GfbpSWFs3/GGTXPzaja GVTA5/NjS8EbKhFKOR9T6LQXFaMpgcY/5uY5a5xC/jVJTLHlublOHO77C0L47/GPoIlX OIe4k0j/iqWSv7jPkEoTUu8nfuhrhGaJJaN8GWQV9SzWP0bISpZjZmNw6ropLOkOQd27 oG8ZNmZ5eki4OWdErFlGDEXGg25/AW8fzcFHwZYehthrg2ZWjMwZB8AN305JrfodBWX5 uZDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ysSI5FqkSkAdCqfOrlzY0olMSzKAxmyo3p2qEMQhEV8=; b=NFx3Q8hRDD7WAItUEaY0zPwq8uc6LQVMz5XyilYCTkajX7aF8NvdFvFun0tRGamEHi PH3+C0NTQ2UsUSn2YXA4chMi0nh5KQ0Iktp0vc4A14NxIFw1eDTKsyBST0YFRcqo0bVD 9ZCqW7GEUapDR0QKa+UTUgtt0nl4E/MrmKCKJ15YDzq22za17xHGbZxx8uppqrzA5kyJ 6Tq3AzkT5/4HyisM5GcZb+zhj0ZIzB5GmoKjYVbVybPR6H1Q7wovQgYP5HHBpDYV9RE2 6w/dQ8OyZrKKo6iIJ4MIUETVxnaUQXKHah07Uwmwm3iMtlaw8P5x7N1NwlYNQGUQn5so y6+A== X-Gm-Message-State: ANoB5pmz9yW7qFb69i0MrnyYkAcxwVVXhcqVjsFtwzfJWENGOjY55Pot 5OYOqOrwCGmc1lDYkXZNCCDkIqseI1VLTQ== X-Received: by 2002:a05:620a:179f:b0:6fa:3f37:5af with SMTP id ay31-20020a05620a179f00b006fa3f3705afmr6091048qkb.572.1668288099339; Sat, 12 Nov 2022 13:21:39 -0800 (PST) Received: from glsvmlin.ini.cmu.edu (GLSVMLIN.INI.CMU.EDU. [128.2.16.9]) by smtp.gmail.com with ESMTPSA id t8-20020a37ea08000000b006fa313bf185sm3811839qkj.8.2022.11.12.13.21.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Nov 2022 13:21:39 -0800 (PST) From: Gabriel Somlo <gsomlo@gmail.com> To: linux-kernel@vger.kernel.org Cc: linux-serial@vger.kernel.org, gregkh@linuxfoundation.org, jirislaby@kernel.org, kgugala@antmicro.com, mholenko@antmicro.com, joel@jms.id.au, david.abdurachmanov@gmail.com, florent@enjoy-digital.fr, geert@linux-m68k.org Subject: [PATCH v3 08/14] serial: liteuart: simplify passing of uart_insert_char() flag Date: Sat, 12 Nov 2022 16:21:19 -0500 Message-Id: <20221112212125.448824-9-gsomlo@gmail.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221112212125.448824-1-gsomlo@gmail.com> References: <20221112212125.448824-1-gsomlo@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749327006913103488?= X-GMAIL-MSGID: =?utf-8?q?1749327006913103488?= |
Series |
serial: liteuart: add IRQ support
|
|
Commit Message
Gabriel L. Somlo
Nov. 12, 2022, 9:21 p.m. UTC
Simply provide the hard-coded TTY_NORMAL flag to uart_insert_char()
directly -- no need to dedicate a variable for that exclusive purpose.
Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
---
drivers/tty/serial/liteuart.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Comments
On Sat, 12 Nov 2022, Gabriel Somlo wrote: > Simply provide the hard-coded TTY_NORMAL flag to uart_insert_char() > directly -- no need to dedicate a variable for that exclusive purpose. > > Signed-off-by: Gabriel Somlo <gsomlo@gmail.com> > --- > drivers/tty/serial/liteuart.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/tty/serial/liteuart.c b/drivers/tty/serial/liteuart.c > index b5ab48aa35cf..e9e99d6b5fef 100644 > --- a/drivers/tty/serial/liteuart.c > +++ b/drivers/tty/serial/liteuart.c > @@ -72,7 +72,6 @@ static void liteuart_timer(struct timer_list *t) > struct liteuart_port *uart = from_timer(uart, t, timer); > struct uart_port *port = &uart->port; > unsigned char __iomem *membase = port->membase; > - unsigned int flg = TTY_NORMAL; > int ch; > unsigned long status; > > @@ -85,7 +84,7 @@ static void liteuart_timer(struct timer_list *t) > > /* no overflow bits in status */ > if (!(uart_handle_sysrq_char(port, ch))) > - uart_insert_char(port, status, 0, ch, flg); > + uart_insert_char(port, status, 0, ch, TTY_NORMAL); > } > > tty_flip_buffer_push(&port->state->port); Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
diff --git a/drivers/tty/serial/liteuart.c b/drivers/tty/serial/liteuart.c index b5ab48aa35cf..e9e99d6b5fef 100644 --- a/drivers/tty/serial/liteuart.c +++ b/drivers/tty/serial/liteuart.c @@ -72,7 +72,6 @@ static void liteuart_timer(struct timer_list *t) struct liteuart_port *uart = from_timer(uart, t, timer); struct uart_port *port = &uart->port; unsigned char __iomem *membase = port->membase; - unsigned int flg = TTY_NORMAL; int ch; unsigned long status; @@ -85,7 +84,7 @@ static void liteuart_timer(struct timer_list *t) /* no overflow bits in status */ if (!(uart_handle_sysrq_char(port, ch))) - uart_insert_char(port, status, 0, ch, flg); + uart_insert_char(port, status, 0, ch, TTY_NORMAL); } tty_flip_buffer_push(&port->state->port);