Message ID | 20221019091151.6692-8-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 y7csp226814wrs; Wed, 19 Oct 2022 02:46:59 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4lBQy9wj4b9vIkaJU3u4r1wkYKt6LPvf97HckW5e4pZUe2gbBp20WXYsA1DxYW/7Cbg1XA X-Received: by 2002:a05:6a00:14ca:b0:563:9296:f34d with SMTP id w10-20020a056a0014ca00b005639296f34dmr7423765pfu.64.1666172819312; Wed, 19 Oct 2022 02:46:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666172819; cv=none; d=google.com; s=arc-20160816; b=eDJlZG105cBSIcd4N/phhJ+o+3qNW9f18mqbYJ1oj3fXROYzvS0XyhoHqynEsIpyjl sOfhC5SUvpVPVlxZ+EkvgCvpqoIPmOeV6YfkJML9lKtCZ9oC4up5Zfo/pKPhdSUxvx5L HRexDvoMFtXAQ0ZhONDyTzQJsZ1alUlTE7gQZR3pBGHIas5Bewo8tZO2I6LJiCzVLX9A uiius3NVEkTq7bjHLYMld14fer5ueK8DIWZXPz2cCfPmMXJplbOKopQH9P9X5SUzT5rO 2HGgh3fixrtZE3f3PSiwIUt4hptXbc1Mc6BAfar6qvJpjeSG93YvboreCbyXQl2mi7sZ dKag== 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=VLXoU1oHLITS+gBp3i8Y4Le/bqHKVzE0pIrTztVl0cM=; b=NOfS7F0CTbHruS7FYx+Q9z54mtgpCm/jc+8ItHk2DNGAO83D8Pxj+scP3Xp3CX1zP3 rB/R0x5oV5osrG4unMR7Ah+eNdHQKKJ/W8n5TNcCBx2Yeryu94c6v+ag3CFWFCNCVxP3 5bRyBZoo0+qPx0m4fLbNIXyUXwKhV6thn8W8J/xLLrdrbfIEii34W0e+kGemjvt0uBmw K/lEuVMYWpgnrA9RcguGEvERAbjP+MydqWngnCtzlyf3MZRz4XM1CVXNR1So2UZDIyBH bPts3RyiwcpBrQ69XjcGVZThNwKfncRiVOv80o28WBUUtoMxcvxHFWaLUg1lJ7lhvxby 1OYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=StcFlOUU; 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 a18-20020a17090a8c1200b0020a6dcc726asi22240457pjo.50.2022.10.19.02.46.46; Wed, 19 Oct 2022 02:46:59 -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=StcFlOUU; 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 S232484AbiJSJhN (ORCPT <rfc822;samuel.l.nystrom@gmail.com> + 99 others); Wed, 19 Oct 2022 05:37:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234022AbiJSJaU (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 19 Oct 2022 05:30:20 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06D8FE8A8D; Wed, 19 Oct 2022 02:13:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170806; x=1697706806; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=5I9HyraSdKGUZglDvEgDU9ebX52QiQY0RZqeQd7tP2A=; b=StcFlOUUto3njMkZHaVX0cJ8bv9A/wQr76yk9nd5nc4DRteQg3eDjLL+ OTKnPDbfvlWIjbvKv9ovJB60lulnquUW3AfT1oQDoWDm+2Wi4wKDgu5AF +qBkIuYNzXEkN9Je+mYRtyu5zDxM++/nYmkIqyJgUPE6NFs26dhZlVkZ8 hidjSJkGMGR2wkQLOKAB49l5h6nKBLhKikcZRemHpLcNRvdBpfmhDp8TK vt1ZfIRVRHgjs7tmhi76jxSIRwoDFlJBn/Ag+kG55CSmCehXu9V3aFp4y ep45KH/L97/QuTm42bMEgjtahD4diwQnFUv2dErOEkg0exZ+4rMTDcMrH Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="332910858" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="332910858" 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:44 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734118571" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734118571" 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:41 -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 07/44] serial: 8250: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:14 +0300 Message-Id: <20221019091151.6692-8-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?1747108830060576368?= X-GMAIL-MSGID: =?utf-8?q?1747108830060576368?= |
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/8250/8250_port.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Comments
On Wed, Oct 19, 2022 at 12:11:14PM +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/8250/8250_port.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c > index fe8662cd9402..b94e60e75326 100644 > --- a/drivers/tty/serial/8250/8250_port.c > +++ b/drivers/tty/serial/8250/8250_port.c > @@ -1842,8 +1842,7 @@ void serial8250_tx_chars(struct uart_8250_port *up) > */ > serial_in(up, UART_SCR); > } > - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); > - port->icount.tx++; > + uart_xmit_advance(port, 1); > if (uart_circ_empty(xmit)) > break; > if ((up->capabilities & UART_CAP_HFIFO) && > -- > 2.30.2 >
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c index fe8662cd9402..b94e60e75326 100644 --- a/drivers/tty/serial/8250/8250_port.c +++ b/drivers/tty/serial/8250/8250_port.c @@ -1842,8 +1842,7 @@ void serial8250_tx_chars(struct uart_8250_port *up) */ serial_in(up, UART_SCR); } - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); - port->icount.tx++; + uart_xmit_advance(port, 1); if (uart_circ_empty(xmit)) break; if ((up->capabilities & UART_CAP_HFIFO) &&