Message ID | 20221019091151.6692-6-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 y7csp225570wrs; Wed, 19 Oct 2022 02:43:26 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4ieVnHhW56lfa1F+dF10o8cE5MQZ15YuUAbqnzU8BnmO52ObvZtylRSUCPpZeOwFxkYdPl X-Received: by 2002:a17:907:94c7:b0:78e:1c4f:51f9 with SMTP id dn7-20020a17090794c700b0078e1c4f51f9mr6200712ejc.200.1666172606044; Wed, 19 Oct 2022 02:43:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666172606; cv=none; d=google.com; s=arc-20160816; b=ka8+/HNDl9dW63JDbfcWCv1jRp7mLkOAXZZ+ukSbiDxQFYaqb18+WVIbgZkMXlpuGR 1AjouXqEwAfYOCPSAaXowvK7TNUGG2B83R/tCw+O4d2rONVQjnjDJJ5exhuQ66o7tANC K0H2YIGLrbOmqfDBG+2wDqKukWAm49XGngCghuS3oNjrbL/cbXfR8n9GuZqyFoF7kRRf tjwGwnThipIvVJivoYxZP+kCHO8QfVB0UcaROQM9jq5bpcT8byn8sd0NxaKBwveWt6rz PAGF2C8/eXMEPG4Eg9AIRJ1cdhlqjms1xBU7fnv0yWuJnewzAokaDT5n7+jX3IRXGfS1 2PWw== 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=DveqZnYPm6oYyUaPo4K0/uNs5moYlu/PFkPsO5dME0k=; b=S46vkjW/ne+WMraY5/Ce4KdzkVV8t2BkJNUhzGuZ0F3GG0LCaSc0K9I4ubja6CIuzZ 3u47ppYjW1o8Y89fE8TEoRIti06+ZatFuYx1DkmYPb1RLq8dXEpX6Ep+YWw27XEWT+GW 4o5JHveKzCgVTHD/axRE0/F5wY3RGsonwpa5R02hSGR+XvJ4XFhcAlZO0fJ+73KDXEN3 J76NeJP3fadTBEog/RCLoy1sG7MaIgElK4E+x0MZjFkowvxU3Sycgyc3Mo9YP/4lVSuM mxDtrUXedKwhqt73t+/Ic97IHEAYXLaM3NYdphemFAPyGFnL8bR5QWgN/23tw6IYvYOk fZIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=KEekfN5l; 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 md8-20020a170906ae8800b007828388864dsi10807182ejb.692.2022.10.19.02.42.58; Wed, 19 Oct 2022 02:43:26 -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=KEekfN5l; 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 S234088AbiJSJep (ORCPT <rfc822;samuel.l.nystrom@gmail.com> + 99 others); Wed, 19 Oct 2022 05:34:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233817AbiJSJ3c (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 19 Oct 2022 05:29:32 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 401E3EC517; Wed, 19 Oct 2022 02:13:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170799; x=1697706799; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=RMQyUAwZq9Wpdc/2bfyn+pazMMtywAfzIt336FID/c8=; b=KEekfN5lPY3vJpYeI7daE74zTvO2ZcyKUDstitQGnNDzIgGzwBtyWDRu 01qTfm9EjqBSfW7eBDb0NkObfYpRK58i/HjwW5hoQPDXlLOCz9ldP3K7D ep2vYH4cEGO+OdV1TzfS3EtK4lbnTUPGQcjXSb6zdWhzIEji7CDh7uqok U50wpYvfZDt5sU309aD6N8G2r1seADGwyfyuUSPTiLT37U/qz7AWxo2um M7p4sGKuQfF459rPfkIUx3CsPiab+UTF/mjASBvVLnauZR1Bz29fE8maf nwBmW7RurZUthGMeffTmMHclA5g38RYingTbdiBBzt/HuF41V86pNF6qe w==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="332910830" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="332910830" 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:12:37 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734118520" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734118520" 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:12:34 -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>, 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 05/44] serial: sc16is7xx: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:12 +0300 Message-Id: <20221019091151.6692-6-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?1747108606760014354?= X-GMAIL-MSGID: =?utf-8?q?1747108606760014354?= |
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/sc16is7xx.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
Comments
On Wed, Oct 19, 2022 at 12:11:12PM +0300, Ilpo Järvinen wrote: > Take advantage of the new uart_xmit_advance() helper. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> > --- > drivers/tty/serial/sc16is7xx.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c > index 524921360ca7..39f92eb1e698 100644 > --- a/drivers/tty/serial/sc16is7xx.c > +++ b/drivers/tty/serial/sc16is7xx.c > @@ -686,13 +686,10 @@ static void sc16is7xx_handle_tx(struct uart_port *port) > } > to_send = (to_send > txlen) ? txlen : to_send; > > - /* Add data to send */ > - port->icount.tx += to_send; > - > /* Convert to linear buffer */ > for (i = 0; i < to_send; ++i) { > s->buf[i] = xmit->buf[xmit->tail]; > - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); > + uart_xmit_advance(port, 1); > } > > sc16is7xx_fifo_write(port, to_send); > -- > 2.30.2 >
diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c index 524921360ca7..39f92eb1e698 100644 --- a/drivers/tty/serial/sc16is7xx.c +++ b/drivers/tty/serial/sc16is7xx.c @@ -686,13 +686,10 @@ static void sc16is7xx_handle_tx(struct uart_port *port) } to_send = (to_send > txlen) ? txlen : to_send; - /* Add data to send */ - port->icount.tx += to_send; - /* Convert to linear buffer */ for (i = 0; i < to_send; ++i) { s->buf[i] = xmit->buf[xmit->tail]; - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); + uart_xmit_advance(port, 1); } sc16is7xx_fifo_write(port, to_send);