Message ID | 20221019091151.6692-20-ilpo.jarvinen@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp227157wrs; Wed, 19 Oct 2022 02:47:58 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6snDwJZj7L7p46ACxabrVCjnFtKaaKmwj1l522DZ5Qh8mJ9BzAGwyVsbmKxEMG0xxsq8pW X-Received: by 2002:a17:903:258e:b0:17b:a251:c80a with SMTP id jb14-20020a170903258e00b0017ba251c80amr7651237plb.110.1666172877784; Wed, 19 Oct 2022 02:47:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666172877; cv=none; d=google.com; s=arc-20160816; b=zuJ0teR92K5S1DtvAGYrVXcidgMAdfWVcy+wZmfQdDdaKToe1dmSVgtVP+dPG1rzPz mvJe0YaIZ6K583kYRE6yMMHfwBfTjF0m3/HhTeXGoZU/1YeU4uYinf5IRdlpbVES2v+y ZomcDKxWeUFZFtVJc2ISW3rve5SxBbUsOSSralLmourJpWHJ7O2gUuubTAYmHhLlpMTr 0DrVjHBxQAS3JWtncp93O1Fcnq6ls9HTmpg3BI3dZWkNpRHk68o6niSLbF7II3C1T0j8 EgUlpT38PLHrKEaozwVd8IY57kXj9reFrnW3/J6X08PZywwuF2Q2zzNoDkqXfkXLIrn3 rMpg== 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=KyJUcM8KYx2KzA/FHI+qgt9F2X3w3v3hDI6NZMqUmaY=; b=0BYarbQfQ++oMiXHjQj1RUBx4+EH3nTqk/O2b9rjnPLQ/IxNJBAhkS/Txx5hH9/L1z He0KeHc2HUFanKutgikNl9mmUXFTnB7wDjAVri9ej42ntsUNJvTl6zIq49JBZdfLJoSk 8w8U4YOynkUi/Xi1QWS6WyKzxecsUtBEa6urI/h92e2fXEq1oelknLF037OuQ8ooH8g0 SFHWDWd9l/3HJa7J2CAI/wB6jeWUdajpDXgod8S8mhp9TUSdWh/YyIJcqj/RlRd/EicS VykWao3JQOkocmYFnnHPYxyB621m2aWQliHIDX6KNjeLqNIRp6TcTfCI3gQKqzjp4pEt 0VGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=cdriaEoS; 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=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n9-20020a170902f60900b0017f73e4af01si1606380plg.298.2022.10.19.02.47.43; Wed, 19 Oct 2022 02:47:57 -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=@intel.com header.s=Intel header.b=cdriaEoS; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233947AbiJSJiF (ORCPT <rfc822;samuel.l.nystrom@gmail.com> + 99 others); Wed, 19 Oct 2022 05:38:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233682AbiJSJbs (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 19 Oct 2022 05:31:48 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 758EDE098; Wed, 19 Oct 2022 02:14:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170880; x=1697706880; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=boa0UFxdlZFq3YZjregu92/OfkuX7qn3ZD0BhYS89oI=; b=cdriaEoSvH3E4d8z6orgBeB5s9woJHnGoabGOxoWjv/+90WkZOVIHmd7 dRIEN09PLcVUvNN7vT4SPWiJ9SIL8oCEGEwkmlwxrNxYMZesvbwd+vUK9 KWfgltg0ulWCubQwcyoriSyY9EhHKGgbIkQ/cOkiMkiYc8peJrUe2kVLm aOUwgwqJFExvnmEt/OV4gX7zqXHVHcqiSwmwuGhocZ/+QQVeeZb3rJ7au o2l3dtBAuss+nw0WDtKU5lhP5yPzmdrCgxJt3ykbJIGxJOXVtfFTpM0zz +iS+rta/BRkeZipcdFedAPVRyfAXAqaPVS9Q6vOfVLu4pFynRSsm8xtft g==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="332911005" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="332911005" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2022 02:13:25 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734118830" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734118830" Received: from sponnura-mobl1.amr.corp.intel.com (HELO ijarvine-MOBL2.ger.corp.intel.com) ([10.251.214.35]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2022 02:13:20 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com> To: linux-serial@vger.kernel.org, Greg KH <gregkh@linuxfoundation.org>, Jiri Slaby <jirislaby@kernel.org>, Karol Gugala <kgugala@antmicro.com>, Mateusz Holenko <mholenko@antmicro.com>, Gabriel Somlo <gsomlo@gmail.com>, Joel Stanley <joel@jms.id.au>, linux-kernel@vger.kernel.org Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>, =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com> Subject: [PATCH 19/44] serial: liteuart: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:26 +0300 Message-Id: <20221019091151.6692-20-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221019091151.6692-1-ilpo.jarvinen@linux.intel.com> References: <20221019091151.6692-1-ilpo.jarvinen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE 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?1747108891126430823?= X-GMAIL-MSGID: =?utf-8?q?1747108891126430823?= |
Series |
serial: Convert drivers to use uart_xmit_advance()
|
|
Commit Message
Ilpo Järvinen
Oct. 19, 2022, 9:11 a.m. UTC
Take advantage of the new uart_xmit_advance() helper.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
drivers/tty/serial/liteuart.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Comments
On Wed, Oct 19, 2022 at 12:11:26PM +0300, Ilpo Järvinen wrote: > Take advantage of the new uart_xmit_advance() helper. > > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.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 4c0604325ee9..062812fe1b09 100644 > --- a/drivers/tty/serial/liteuart.c > +++ b/drivers/tty/serial/liteuart.c > @@ -136,8 +136,7 @@ static void liteuart_start_tx(struct uart_port *port) > } else if (!uart_circ_empty(xmit)) { > while (xmit->head != xmit->tail) { > ch = xmit->buf[xmit->tail]; > - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); > - port->icount.tx++; > + uart_xmit_advance(port, 1); Acked-by: Gabriel Somlo <gsomlo@gmail.com> Thanks, --Gabriel > liteuart_putchar(port, ch); > } > } > -- > 2.30.2 >
diff --git a/drivers/tty/serial/liteuart.c b/drivers/tty/serial/liteuart.c index 4c0604325ee9..062812fe1b09 100644 --- a/drivers/tty/serial/liteuart.c +++ b/drivers/tty/serial/liteuart.c @@ -136,8 +136,7 @@ static void liteuart_start_tx(struct uart_port *port) } else if (!uart_circ_empty(xmit)) { while (xmit->head != xmit->tail) { ch = xmit->buf[xmit->tail]; - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); - port->icount.tx++; + uart_xmit_advance(port, 1); liteuart_putchar(port, ch); } }