Message ID | 20221019091151.6692-4-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 y7csp226243wrs; Wed, 19 Oct 2022 02:45:22 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6CyYYu+miSidp6k/Cr5FNrca5TC/FKiOgzWRMmMNfbIrtasztEc5hsiwYUj84Qn9ld9rS5 X-Received: by 2002:a17:90b:1e43:b0:20d:59b9:751b with SMTP id pi3-20020a17090b1e4300b0020d59b9751bmr45457241pjb.90.1666172721708; Wed, 19 Oct 2022 02:45:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666172721; cv=none; d=google.com; s=arc-20160816; b=ZrL+HHILOtD9rEPbdC4piSv9lJfb2mcStOjaGw5BRhzvONWyMlN9iIp53i7Y7ebCV7 0+qvlqWtXWE4ihq+SHWTYew8jW2ATHhli5pFGsSL2UERvlQpN/7FoK3RVhtPmtmJPIwA Klq/uUHbU7ZmFb0c7404Ba2gLa+g+YRpJdtK+P+fmOq/NDbE00DVNqLAGzwR4ZooTSCb fwuv3yztifqlhiBwMVHqkgSqT+HKkHteW7AzUVodEeU11N6QsnDSCA/DgrmWErHA2k6c GN31xQWLro7KGjUX4ogA8I4NDdvUCfk7UrWttYV6I2x2BAMh0FqYvxTXFpEKmc/RUzD+ Q0/A== 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=YakAM1isWazFw8vbuAhEZMbmJ0RsmQ9Mhhr3qy33VxU=; b=Ttehm1coq5wvbyqox91bG3etMtItvjkhcNYSVqwBMzetTS/MswuGZ9FnGegpjZzUO7 u56YT9Su2bDYqO0l2lwYx2Xagbcvlae+ai4RuzbDdzk6SK+WZhdxjwfmIbQYLLL5X+Cy S3i1/yJ/5w+TIiQVrAimADE7Yqt3hhk6ao311Gx/7FT3SK4mongh7tvM+uGJjDXKILKi RI+tF0OHBVLoGsGdbW3BUPmyGrcWQiloj/FDF5LoTfJSxSxKg2yl6O3hYb8qhZDmmebm Oo5MzwoeEsUnod9/towMgGcgu915fYnMzYULCdswwtTqSNvzpMUCgEhAQjUox17cZwVs eMIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=GPbJIaIV; 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 in17-20020a17090b439100b00205de9ed2ffsi15260900pjb.43.2022.10.19.02.45.05; Wed, 19 Oct 2022 02:45:21 -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=GPbJIaIV; 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 S234138AbiJSJe6 (ORCPT <rfc822;samuel.l.nystrom@gmail.com> + 99 others); Wed, 19 Oct 2022 05:34:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233844AbiJSJ3i (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 19 Oct 2022 05:29:38 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 914FEC1DB2; Wed, 19 Oct 2022 02:13:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170793; x=1697706793; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ICgkWh4UzIvOwjy10LsjhlqTKeelCAII67CPIN6cvH8=; b=GPbJIaIVnaqL8qtpub4X6agLDY/55drV56/iiNxWwZObH/qVHy+a3aFc SsAcDnBDwLkPypKMWONyRLGqjZU5vYX2jVAsEfQhU1ZAlGUOtus0lXntV n+Gq95mqrKExAGjrFVa/M2u3O11CRo80LePqzDikha8bbJLbfBUjx9mj3 /lOUmbLobADHszWsnumiyXfXZO9OKc+Tgi57DXUzzrvSRV13kisoqgtWk CBXasuYzfrdu3osfELnXv86/Eg/ngmTE7To3umnLiizsWSdONoj1/X6v5 k0xA+9U32Zn6eMP4RAqJuSrGY414V+2SV0YVr7SxkdnOc9vUqodLHhr+R Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="332910807" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="332910807" 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:31 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734118473" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734118473" 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:27 -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>, Andy Gross <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@somainline.org>, linux-arm-msm@vger.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 03/44] serial: msm: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:10 +0300 Message-Id: <20221019091151.6692-4-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?1747108727869333808?= X-GMAIL-MSGID: =?utf-8?q?1747108727869333808?= |
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/msm_serial.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/drivers/tty/serial/msm_serial.c b/drivers/tty/serial/msm_serial.c index 7dd19a281579..2b2e0f74b75a 100644 --- a/drivers/tty/serial/msm_serial.c +++ b/drivers/tty/serial/msm_serial.c @@ -464,12 +464,9 @@ static void msm_complete_tx_dma(void *args) } count = dma->count - state.residue; - port->icount.tx += count; + uart_xmit_advance(port, count); dma->count = 0; - xmit->tail += count; - xmit->tail &= UART_XMIT_SIZE - 1; - /* Restore "Tx FIFO below watermark" interrupt */ msm_port->imr |= MSM_UART_IMR_TXLEV; msm_write(port, msm_port->imr, MSM_UART_IMR); @@ -866,13 +863,11 @@ static void msm_handle_tx_pio(struct uart_port *port, unsigned int tx_count) else num_chars = 1; - for (i = 0; i < num_chars; i++) { + for (i = 0; i < num_chars; i++) buf[i] = xmit->buf[xmit->tail + i]; - port->icount.tx++; - } iowrite32_rep(tf, buf, 1); - xmit->tail = (xmit->tail + num_chars) & (UART_XMIT_SIZE - 1); + uart_xmit_advance(port, num_chars); tf_pointer += num_chars; }