Message ID | 20221019091151.6692-15-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 y7csp227138wrs; Wed, 19 Oct 2022 02:47:55 -0700 (PDT) X-Google-Smtp-Source: AMsMyM684ISeqYSPLJAesz1JTixockoPvcw5LxyN2pmgLfC01rDYOWInD32C2YPKJ+IStIiIiK4K X-Received: by 2002:a17:902:f7cf:b0:17f:9081:a3f7 with SMTP id h15-20020a170902f7cf00b0017f9081a3f7mr7436194plw.3.1666172875446; Wed, 19 Oct 2022 02:47:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666172875; cv=none; d=google.com; s=arc-20160816; b=ZzCRCJf67mKiTpiz8j1mWO8YFRUbVegXT5jtqjaKPjKBwguXY2u1ym3PqW+fPANHAs U3kW1an1txLmfdKgc/wdxiNYAqLykG7GqwJiAx2li9TSI2IyNNscREjqphLsoVqOzB1H vgBJ3gsW7Z1O8yfuPRywg53QI/lmw4xYfUMa36zU3RisqFXTANfjaiF5FIy8oyCTrpJ8 Ff7d5A7MIXt5UMgKbEu3dVsupfURbobM2Ax9zGUKnpjUoT01Bt0Y/7mZdXuaFuAjwuk+ 6GKxBcjIccgR3NUydUFKNlhMeQbQS40i39CrtlSEUo/EBB7+l10KYoa9+kPcg0dtZh2H pjnA== 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=bfW+IAG9wf5GMNfIUZe5eOX/TyI25FSYxc8R/m2k/bI=; b=lfjJ/FWbn8jufD70Qc6WIZdNHfQZa2C7Ibczvd9iTMbC3SLH1926NfmonesAENOPzr Be5u4LLhi5VUcuOX8fpJAc8fGNpWOEXf40tP3p3cFv+0BbZaEgVn2oPqSYvxzFZ9PB8B os5OkXSaQtkiaRXeT64xVP3OOG3YrrRNiDqg2aMoQORvTES1L1rkIQyrekYXSziN3nAi z8UqOzEKPFv4pWDCpZr742rQovf7HOSn77vtb2/XFXueKwEmQss8iXH+90ri/jdqPAQv fF/kFVHy0NlHb9qWhEAfVoY6OgpQ5Kxc8fbFAiwV2obvdfQBFFMGo6p1tGfc7nnL753l 6oLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VP6f8OWu; 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 c14-20020a63724e000000b00439ae52c996si17144053pgn.71.2022.10.19.02.47.41; Wed, 19 Oct 2022 02:47: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=@intel.com header.s=Intel header.b=VP6f8OWu; 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 S233870AbiJSJhr (ORCPT <rfc822;samuel.l.nystrom@gmail.com> + 99 others); Wed, 19 Oct 2022 05:37:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234126AbiJSJaq (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 19 Oct 2022 05:30:46 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 409EDC90FE; Wed, 19 Oct 2022 02:14:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170857; x=1697706857; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6iBAyZ2TmBGOpfnjEhIUNYz8G3ZZgfaE+WLV4oh63c4=; b=VP6f8OWuF8WgI2U3k3JguXFu9abwb48IKlYTdQJJOPCRlzzw6kyZWYEL wEDGpPPbK+2MTTZoBYvSEVYCC/UCWGurAdA5y8TZ2KdoKcydyqEgKhaUi P00NPWUBSuq1jltE73ih+TGGUZOAeGZB7DRKdNbn9TXQz+7d/LAY1NQMw rr5ucOMP4sLinugh7z7x6d2D2CzCFNfHkJ9D62rvxf5mqEMFuNkzwJF8H /mE5Iel23tAdeyPWVh7cfYy37Bs4SWAs/RG+vKCTpC8EHsDOf3QZeXHBm FOF5WbNvUG0zjHiuVH+My+WV9DUJdgYZlf8/n9Ahl3WQ2DPr+dIKaeYhk Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="332910939" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="332910939" 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:07 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734118733" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734118733" 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:04 -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>, Baruch Siach <baruch@tkos.co.il>, linux-arm-kernel@lists.infradead.org, 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 14/44] serial: digicolor: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:21 +0300 Message-Id: <20221019091151.6692-15-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?1747108889245927294?= X-GMAIL-MSGID: =?utf-8?q?1747108889245927294?= |
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/digicolor-usart.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Comments
Hi Ilpo, On Wed, Oct 19 2022, Ilpo Järvinen wrote: > Take advantage of the new uart_xmit_advance() helper. > > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Acked-by: Baruch Siach <baruch@tkos.co.il> Thanks, baruch > --- > drivers/tty/serial/digicolor-usart.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/tty/serial/digicolor-usart.c b/drivers/tty/serial/digicolor-usart.c > index 0c0a62346f23..ed197705f7ee 100644 > --- a/drivers/tty/serial/digicolor-usart.c > +++ b/drivers/tty/serial/digicolor-usart.c > @@ -202,8 +202,7 @@ static void digicolor_uart_tx(struct uart_port *port) > > while (!uart_circ_empty(xmit)) { > writeb(xmit->buf[xmit->tail], port->membase + UA_EMI_REC); > - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); > - port->icount.tx++; > + uart_xmit_advance(port, 1); > > if (digicolor_uart_tx_full(port)) > break;
diff --git a/drivers/tty/serial/digicolor-usart.c b/drivers/tty/serial/digicolor-usart.c index 0c0a62346f23..ed197705f7ee 100644 --- a/drivers/tty/serial/digicolor-usart.c +++ b/drivers/tty/serial/digicolor-usart.c @@ -202,8 +202,7 @@ static void digicolor_uart_tx(struct uart_port *port) while (!uart_circ_empty(xmit)) { writeb(xmit->buf[xmit->tail], port->membase + UA_EMI_REC); - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); - port->icount.tx++; + uart_xmit_advance(port, 1); if (digicolor_uart_tx_full(port)) break;