From patchwork Wed Oct 19 09:11:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ilpo_J=C3=A4rvinen?= X-Patchwork-Id: 13011503 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A46A4C43217 for ; Wed, 19 Oct 2022 09:14:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cxULGaTjYN+tHjYhwng6TZjFfeC0wJrRyzgxyTSdpAU=; b=ePcTIimRZRlkDq T69S6DFLB/kIH7Qsz3hrKszU9npe5aYQ3M73d8OZ7vNPngIR7ybbZ72xW4lYztHbO+Y/mpI99TJhm gURndATeU+bon+vpYOMNXrHzRdHd4OmYNBJZDwok05dby9bMnLvoerrb6Cy9dvHunWh3Ljs2SZuE5 RhfVDS376x1FBXc1+zH30I7EyITiDGbjKFk55B2aHlMIEYyFhFc4zBIjFSt1qizYqCABT2OTrtl9S WCtWPNfFBolp4Yh6aN/4tfn5VVuvWIG/xuuLb5ku7S7MVKA/aF+8hx8d9b9IfbVdXfynwZqtKrFqk /pgNa22a9mul5aoQoMWw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ol58d-00HFy9-KR; Wed, 19 Oct 2022 09:13:23 +0000 Received: from mga05.intel.com ([192.55.52.43]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ol58Z-00HFuu-UU for linux-arm-kernel@lists.infradead.org; Wed, 19 Oct 2022 09:13:21 +0000 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=SVyuluNhKfUl6XPBNwDdqJifQkuYh/oy8JzAs+w5pCs=; b=bh3WZT2GPGQnNOmgPmDiQvrj+BXDM4T2Kr1rLvLxN+wKUpDUT8sGcIoc SlcGDfN924ydO6vu9vwLuOUq+x+bhzmmeVXjBZI8fgKS4+/rHk5579vG3 Yu3ctMbocDAqoaSUYw0JxFWAcEcB7QuhKdy25ULfA9aZyV6eHdoapoqBp R19AwA8tW66nsETDctS0A9znmXuhqs6yw19hVna8BCMAMouWKdq+0ejN+ jw9z5kUnJFUkrYEQyzJsgca4e9mGXj6FIKUo10IbOKwBZdA2Nbk1vxIs+ ckMiryens5mK+lYkjca3TMgVPr6r05fL7HyTl8qwUauQvFfh3tD0nGkUC A==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="392656096" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="392656096" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2022 02:12:58 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734118651" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734118651" 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:54 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , Richard Genoud , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= Subject: [PATCH 11/44] serial: atmel: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:18 +0300 Message-Id: <20221019091151.6692-12-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221019_021320_037536_42E01412 X-CRM114-Status: GOOD ( 10.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Reviewed-by: Claudiu Beznea Acked-By: Richard GENOUD --- drivers/tty/serial/atmel_serial.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c index bd07f79a2df9..4485f2d26b77 100644 --- a/drivers/tty/serial/atmel_serial.c +++ b/drivers/tty/serial/atmel_serial.c @@ -875,10 +875,7 @@ static void atmel_complete_tx_dma(void *arg) if (chan) dmaengine_terminate_all(chan); - xmit->tail += atmel_port->tx_len; - xmit->tail &= UART_XMIT_SIZE - 1; - - port->icount.tx += atmel_port->tx_len; + uart_xmit_advance(port, atmel_port->tx_len); spin_lock_irq(&atmel_port->lock_tx); async_tx_ack(atmel_port->desc_tx); @@ -1471,11 +1468,7 @@ static void atmel_tx_pdc(struct uart_port *port) /* nothing left to transmit? */ if (atmel_uart_readl(port, ATMEL_PDC_TCR)) return; - - xmit->tail += pdc->ofs; - xmit->tail &= UART_XMIT_SIZE - 1; - - port->icount.tx += pdc->ofs; + uart_xmit_advance(port, pdc->ofs); pdc->ofs = 0; /* more to transmit - setup next transfer */ From patchwork Wed Oct 19 09:11:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ilpo_J=C3=A4rvinen?= X-Patchwork-Id: 13011504 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C8786C4332F for ; Wed, 19 Oct 2022 09:14:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AG2l5OKUsVu0HDzppHOTPnjFJpj7x8/VV4v4VfZGaWI=; b=WA3IsQNgfD73Eg OotiLonlFEMeqRmdV8e8Gzl1xDdR6E32XK2Vc8NA8m0HVombU5XdCPoEjDCyj2U5xyYwhJPZ1Q0Ss 7zSJRLAC8CP2208HWkrr55ZqrIunif73qfoh4BqYejHUq7Cs5KZmiJP9nRj38G0OM2MK/JSsBWGPq 97qkvC9fWDWNM8NlOgsYlzd1sphcq7F+NezRONckV9x1hrwLj1lN1Ntr/9++R3C2t4ckGxddgDfsx 9Zr3WVGPvViTQ/mZa40VAPSQ8k7lJd/D/HlBB09jn73/7hE/acnpY5Q7I43YqoOok2LOZfD78q0on i4NrLxuOTDbUxVepE0bg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ol58p-00HG40-Vc; Wed, 19 Oct 2022 09:13:36 +0000 Received: from mga05.intel.com ([192.55.52.43]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ol58a-00HFwL-3K for linux-arm-kernel@lists.infradead.org; Wed, 19 Oct 2022 09:13:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170800; x=1697706800; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=eMX93eH2WJp+28L/XNZpc2+/7jkBXPYnsGkOfw2cMDA=; b=Li1c0urENBaM+BeU4XM9D35S76WVmL3jHR09Dvpwop2Ngyi8riSJ0EVE CRe+EqsRBfDFd9i/K3VWDrmt0p9S6MwX81OtUIgo48Fiak4MTFy1B3/Rf VaTqrijVxcYeLC6J+vps9V3j/uJkE5q9EVAexKQdHgyg68WVkxqBTmA6W lrARmlrO/Hgr4z79/fcVX7Qpe/ZtoCLD56UOfHanf9b5jEe+tSZJyf+H8 6LFzcGfKacKcIEb3trBJuXfZTi7wMEifK3MuCTvQhoSPP/ucFAqr+1T2b L61oV2U3JutY/tk5VGcZm50L73JsWZP5chmyDCkHHinjEcD+vPepLbMTG Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="392656105" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="392656105" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2022 02:13:01 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734118685" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734118685" 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:58 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , Alexander Shiyan , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= Subject: [PATCH 12/44] serial: clps711x: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:19 +0300 Message-Id: <20221019091151.6692-13-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221019_021320_198040_A1662CA5 X-CRM114-Status: GOOD ( 11.73 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/clps711x.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/serial/clps711x.c b/drivers/tty/serial/clps711x.c index 404b43a5ae33..e190dce58f46 100644 --- a/drivers/tty/serial/clps711x.c +++ b/drivers/tty/serial/clps711x.c @@ -166,8 +166,7 @@ static irqreturn_t uart_clps711x_int_tx(int irq, void *dev_id) u32 sysflg = 0; writew(xmit->buf[xmit->tail], port->membase + UARTDR_OFFSET); - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); - port->icount.tx++; + uart_xmit_advance(port, 1); regmap_read(s->syscon, SYSFLG_OFFSET, &sysflg); if (sysflg & SYSFLG_UTXFF) From patchwork Wed Oct 19 09:11:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ilpo_J=C3=A4rvinen?= X-Patchwork-Id: 13011502 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F2130C4332F for ; Wed, 19 Oct 2022 09:14:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tiPPEpYfVwInt654xctdTU764x6jerWDmSeE2BOk0Yo=; b=TScJW9k460mh// QstP03CypjYjZ01WGkkvTtzSmD8x4liMwRF14+m20gQP4lxvIju8boHLIFttTLp+60cM9NXFTDgoh H0FUbSxcVUfS/Yt6euchzClCZf8eXiH5xqELnWcEUGJ+QmIVSPM5Vf+TifC6FuIC0+tmaqvKDU2U9 IM7RAvgNJlhG1wyFpCe3LW/zOf5wc3BRB4ddA2KpR+QPUkOZsGz/iMl/89UwCQsSw+6i+9J7ViOlg //uLm5Fg/x31nmBSQLL1CLmF8gdw4ajj0PipAk8YxbxV0oTRjVz1RieQJVQ73BZcX4B7huu0CLawu guqfvrrgT51HF295j9Fw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ol58U-00HFuL-K7; Wed, 19 Oct 2022 09:13:14 +0000 Received: from mga02.intel.com ([134.134.136.20]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ol58R-00HFsC-9R for linux-arm-kernel@lists.infradead.org; Wed, 19 Oct 2022 09:13:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170791; x=1697706791; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6iBAyZ2TmBGOpfnjEhIUNYz8G3ZZgfaE+WLV4oh63c4=; b=PknBWR6H8hhAE3EA/d1BxyyRpFFMqjOqDxy9ZEBovtVbObN+9QiHniLQ jR8KfXI3GVJxyFt6mN4cBv7rs4bsXtQ9rB3sCIhbz5Xv/VfxSLS7d7gPk HB5A9GzT/rVveQUfs5cmdAXfj3wC0MqmfdylKXJncuYVJMR382I2dJFD7 bg8Q1dbxMZDqyB6gfpOzP7Us3oOgOGTXMVLZ+kBKZgvj747BvB5It946l oBxLWatgnBJxihFVG4X0ru6V0l2VcLjI8lq+2KuUVu/E1hW4rVvua2Nv4 Ot7e2Hi8jZhhGBjPiKOfZT8QjFKBtxlPN+S3OyL+s0su7T9aYiKgGxCoW w==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="293750761" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="293750761" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.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?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , Baruch Siach , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221019_021311_418079_DDE0D9DB X-CRM114-Status: GOOD ( 12.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Acked-by: Baruch Siach --- 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; From patchwork Wed Oct 19 09:11:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ilpo_J=C3=A4rvinen?= X-Patchwork-Id: 13011505 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A5D2BC433FE for ; Wed, 19 Oct 2022 09:14:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=BV4y+FBB9m5HpP+HMA7l8V7U+0d8Jw2qFEC5cSDbBFw=; b=UJ6Ii/VF0BILBo vKDzeqAbFeMkDZfK3kYg3YzLRIar+3qMwnXHhvYKJFaVAqmBX0M/fhMdb/7WbtRXpSo+8wg+g+GKB jy9qZmgIKkvv8BO1PEVD30NAinlNknCnr19PG9y9Q6oDvY3iPvP8jFBlfx1m7IA+NHHKYOsKcSbti fwWgNqt4ocP5zeyxcCLaMA+OSmSUGbyVCJvAakfuPMtzLNRheLFF8UVxznm0NaNUg8aIMJdpoYZfA +5kyUZjus+EcDLrdvLV8W8G8ehf3y/wvRVTqFoxRhpGBTM4jPWhV7UqAt0aHGYLXkOELJszlPe/jO 4PhInTM5BtIALeicTIIw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ol596-00HGFf-8w; Wed, 19 Oct 2022 09:13:52 +0000 Received: from mga12.intel.com ([192.55.52.136]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ol58a-00HFvL-Hy for linux-arm-kernel@lists.infradead.org; Wed, 19 Oct 2022 09:13:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170800; x=1697706800; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=LfL2WHC8lVbuBm2BucTh8bRu07F0VUCsL+ehIqnzvLQ=; b=ALJMq+fek8kI9cbNA5XW0S60/zmem0pOG7foInHcECyIEpiHu2dECIUT 2lN5YFMgWSo8l6tN4e6fayaHJiv1VNAJYia4ckx8itsREgT8CAyprr499 OqCJLW2eCs2F3QHk9Jcn8lrRCUjHV5jz2FRrfwrK5V0/fK4wmWT9Ar7cN 4TLyx2uawngfQ7EYOmRhjjuyK9VzTDfh++1naPzgMClJhVnFNW+QsuWs6 EI0NhfKl0gGoQVyZ+rxFAzuNYjmCMAmBhKRK5NBYAAJWgJuaTPbEnZ6se scsj8DMucpjHjFALWDMhpm6djmPE4QusFB0+RZSN2eHSkuwNxKOk0bEMI Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="286072576" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="286072576" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2022 02:13:17 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734118794" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734118794" 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:13 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= Subject: [PATCH 17/44] serial: imx: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:24 +0300 Message-Id: <20221019091151.6692-18-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221019_021320_638110_6F5CCE5D X-CRM114-Status: GOOD ( 11.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Reviewed-by: Uwe Kleine-König --- drivers/tty/serial/imx.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 05b432dc7a85..a7548d0a1aee 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -563,8 +563,7 @@ static inline void imx_uart_transmit_buffer(struct imx_port *sport) /* send xmit->buf[xmit->tail] * out the port here */ imx_uart_writel(sport, xmit->buf[xmit->tail], URTX0); - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); - sport->port.icount.tx++; + uart_xmit_advance(&sport->port, 1); } if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) @@ -590,9 +589,7 @@ static void imx_uart_dma_tx_callback(void *data) ucr1 &= ~UCR1_TXDMAEN; imx_uart_writel(sport, ucr1, UCR1); - /* update the stat */ - xmit->tail = (xmit->tail + sport->tx_bytes) & (UART_XMIT_SIZE - 1); - sport->port.icount.tx += sport->tx_bytes; + uart_xmit_advance(&sport->port, sport->tx_bytes); dev_dbg(sport->port.dev, "we finish the TX DMA.\n"); From patchwork Wed Oct 19 09:11:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ilpo_J=C3=A4rvinen?= X-Patchwork-Id: 13011506 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1A7D5C433FE for ; Wed, 19 Oct 2022 09:15:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=TF5voaMVkTBlP+Vcc2ugWF+Kg6mhiwoR91oPR7UpSSQ=; b=ro5cCJLwLDTzDi uiUXgi9pYNW6suhH0dC3pQy3v7+QAzCpldKObPzWPfVRtjYrt5k9tY8aVi/6mJJ5/kKhFIMo20RvL 0ZWqEQRxpw+DLLTVxoYdfgsxwghaUrm0bIbTJklZxIesatR5ChLN4EC2/U/9DPs3ICTjAK+ZW373K 5Yu+NQhC8C5YnY9DHJkw79fwgZhwq/tzyuNkI/dK9UVVDTeR/IML0LoGkJEPCEmw66c5hS/tkaSy0 3kLrDYvh7/3uoT58OwWc3oSc91Jszh/LrQFW5bSaGSSDPPJqg07bircb+JhmTFiiTVfAq8GkZqIGN sx17QeUtRBlKVA6qmotg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ol59N-00HGOD-VC; Wed, 19 Oct 2022 09:14:10 +0000 Received: from mga17.intel.com ([192.55.52.151]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ol58p-00HG3w-JM; Wed, 19 Oct 2022 09:13:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170815; x=1697706815; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=I2sO96QvGbKZASEZajyqgl5elACacZqC44Dvl0bF594=; b=KHQdRngMfSJeTjHil7/a9Mu1x7WLczSHuf4EzSxyktVTVJtQL+hN8mfu 9HdPPd7vjpBaRPgztHpPmgWJJnGJ9EPOys7f7+E9yVPp8Mel5N3gn2z14 l7+dKFivB0ByfFFmAu2pM/wp7Vw9t2tCnThxrUMtS7eIpH1f5sSQrQZIR jjTJaI1qIvtncItwBZRtMljT8burj9dEI2dQpU3inal8Qnd9M6qxmLhay RCYWpJ0iwJyJN1UgUxN88A9+47wlMGo/XuiIUDKoBRYbgcze0YNX7v1vD 3kBl1P7QgCrlYXV6CSapAd94iAsAt+5eKlDyP1z1ugHmB8YU/9aratZqs g==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="286746427" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="286746427" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2022 02:13:35 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734118880" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734118880" 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:30 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= Subject: [PATCH 22/44] serial: meson: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:29 +0300 Message-Id: <20221019091151.6692-23-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221019_021335_665368_844E7C06 X-CRM114-Status: GOOD ( 10.00 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Acked-by: Neil Armstrong Acked-by: Martin Blumenstingl --- drivers/tty/serial/meson_uart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c index 056243c12836..74110017988a 100644 --- a/drivers/tty/serial/meson_uart.c +++ b/drivers/tty/serial/meson_uart.c @@ -162,8 +162,7 @@ static void meson_uart_start_tx(struct uart_port *port) ch = xmit->buf[xmit->tail]; writel(ch, port->membase + AML_UART_WFIFO); - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); - port->icount.tx++; + uart_xmit_advance(port, 1); } if (!uart_circ_empty(xmit)) { From patchwork Wed Oct 19 09:11:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ilpo_J=C3=A4rvinen?= X-Patchwork-Id: 13011507 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6917EC43217 for ; Wed, 19 Oct 2022 09:15:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=23hYDo+0g9O4CpjDuwE+Rl7knwj0zy3uI0bxCiVE0Jo=; b=fXRnOqZAm7fbas L3GBerljxmoKEhV4Zg1HOegUxvGuhPUT8CvLrFKMYnoKBqAbHAi7FSRVsttyqx44xtFh6j2ouPDu/ TaVtn7Cv+oE/rslcWr5SFtS9h58QQt+VEKcnu4hS9KFrTLlfEliVbd/YHGExkmYeM2Ojo8A3uT3Rd hypHxCLSeomceIGK3wiv76/PyFlfrooe4aIaQZ4iJBRpzk3YX9T0RoiLLNh8NvUnqvRx+39hx3Y55 BlL/jyg0R8h1PKR4fF2o5tMeeNNhxu7SjaNCTfKQrHNpxvAcSSZ4wrEFWcGviXAOEpKGXuLUr9JVN LmJAdrFnKWn+0GW7ky7Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ol59c-00HGca-Qa; Wed, 19 Oct 2022 09:14:25 +0000 Received: from mga17.intel.com ([192.55.52.151]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ol58s-00HG3w-VP for linux-arm-kernel@lists.infradead.org; Wed, 19 Oct 2022 09:13:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170818; x=1697706818; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=F5OoKeiZlb0GHRmkwQOoMqMFYKZ9krELi+lO3n3U0sY=; b=J3Qb/7TUk4rRA4G8vNS7FlY9KsMkkHf4HThUXqkaG+4Id3mUeYJfEcHl FuLFvt3pmdZ/ujCXR8tjXCUFaeZJ+yndrJySM6gELDHUBeldXrJyfABFC 7bc4eAvRS6CSeeDbWSONZLvyIFA28kXjUDl3+xPwDQNQjpjhadmtUhf/h qiOUnsjRfIpz0bbMVrsmXp+E6Ue+kYMLH98FN3i2XIaNNcQMUFKnNMSyN 9hB81Ext1E4ZtvnTNj0T9Xr0zvCDOvj2tCB6ydqKdxR4D6g92bSyXNbf6 CgtYvOciajgizPo6eFQjeoliB/PK+8au/M1Ew7/uQBtX/UEueCGYdNMQH w==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="286746457" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="286746457" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2022 02:13:38 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734118922" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734118922" 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:35 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , Taichi Sugaya , Takao Orito , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= Subject: [PATCH 23/44] serial: milbeaut_usio: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:30 +0300 Message-Id: <20221019091151.6692-24-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221019_021339_107136_0D5751E4 X-CRM114-Status: GOOD ( 10.57 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/milbeaut_usio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/serial/milbeaut_usio.c b/drivers/tty/serial/milbeaut_usio.c index c15e0d84dc7e..44988a2941b8 100644 --- a/drivers/tty/serial/milbeaut_usio.c +++ b/drivers/tty/serial/milbeaut_usio.c @@ -98,8 +98,7 @@ static void mlb_usio_tx_chars(struct uart_port *port) do { writew(xmit->buf[xmit->tail], port->membase + MLB_USIO_REG_DR); - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); - port->icount.tx++; + uart_xmit_advance(port, 1); if (uart_circ_empty(xmit)) break; From patchwork Wed Oct 19 09:11:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ilpo_J=C3=A4rvinen?= X-Patchwork-Id: 13011508 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 89108C433FE for ; Wed, 19 Oct 2022 09:15:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=GW0FCPe750ecv2t23TDVQmDgG0THEPZo6KC+TrwB/oo=; b=a+GZt6xQTQ7pun Q/V/lkWT3C51qLfCxsMAQA8aBEJk33YyEeyeA/ooJLaf9ggPuYzP1f5VDnIqeXM1F9zq2qYNAxscJ P3M8oNEp6m+jjHwOjkDGZavZfReMz0JUZC/NlrVDgYGq/BNuYtAzvJvu3sgL0a0JbtKZzrYajd9io Jx+BWA16iRQDQ8Uo+rEcLsEeR8EiGpCZkDQJ5IKvn23Ejwje8juhyQ3gk4x9vdrgBr9DpCjs4+ig8 /3+ADG1LrQSTT79YX4vPlfTJROF0orVD3bVYTQsJY4v9bWd/rm6yVdWbJLKyI2eqkuwl505QZTC+s xRNKepoQ0b/wqDRjq73Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ol59z-00HGxH-RZ; Wed, 19 Oct 2022 09:14:48 +0000 Received: from mga02.intel.com ([134.134.136.20]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ol597-00HGGd-Gw; Wed, 19 Oct 2022 09:13:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170833; x=1697706833; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=SUPklsG2WSSwlcnWLtfDOus/SL3h7qEsP6z+fE6Ek7s=; b=ku+TKWqRNgv5FY0zd8O/TlOPmEflSsfKQUqiWmN3fJLQHraSxo0u2CP2 sc7WmKnT+4lOhUdY+psH6NfwWT4WHpUe3dard51FDnrNA3FCqPasNylq2 Ufpq9I+9Hr2RrdOUyl1r8TCgJiA5TsDwG3jPcbQQnFZvjaP2bmczEzbO/ LV6VMKPI8aQXJnFxvU2MhkQTR5Jvbau5uDbhz0P3GBhsU5bahwjovyhUZ aJw5jhthN477CGEWqUb4lINPhknWPyEX+sOL0zbRcymvW7Vubrx6aCZZo +JQhAqOiE7xpSIXIJHHqKzbzPocp+/TvHrNtJaIoodtL6Pu+tL1DEI1tx w==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="293751024" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="293751024" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2022 02:13:52 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734119027" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734119027" 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:49 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , Manivannan Sadhasivam , linux-arm-kernel@lists.infradead.org, linux-unisoc@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= Subject: [PATCH 27/44] serial: rda: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:34 +0300 Message-Id: <20221019091151.6692-28-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221019_021353_640015_A3AFDFC6 X-CRM114-Status: GOOD ( 11.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/rda-uart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/serial/rda-uart.c b/drivers/tty/serial/rda-uart.c index 0e387e2144fa..be5c842b5ba9 100644 --- a/drivers/tty/serial/rda-uart.c +++ b/drivers/tty/serial/rda-uart.c @@ -353,8 +353,7 @@ static void rda_uart_send_chars(struct uart_port *port) ch = xmit->buf[xmit->tail]; rda_uart_write(port, ch, RDA_UART_RXTX_BUFFER); - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); - port->icount.tx++; + uart_xmit_advance(port, 1); } if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) From patchwork Wed Oct 19 09:11:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ilpo_J=C3=A4rvinen?= X-Patchwork-Id: 13011509 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D558CC4167B for ; Wed, 19 Oct 2022 09:16:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=C4ogQktDTHMF2R+ozX4lt91b6lJuOEAQJ7L3SlQ6oGw=; b=e+FELqoQ48ripW aaXik/DVCB9ObmvvmFp3GK52h8v9nXR8srkRMm+u00e3KaL/JaGERfYNpNnihSKX8nz7jKiEWWIqi DqBMOZh2TbUbwkeBIsD320KVA20OYI4nR6yadN3Lq4X6K4JtHM7R19qeoB0EN2MZTnYYWpiwgMIki K3emv4W3FyhHV6CX1j02CqtMNtzCVKm4tdSWf0rPPJdYpP1xgzNvhOs+qCCGM5OPcLbcfpTvB7Owk oQvf65pl07GRq/DZDzfzHfa79VlNKRkjqVefKgYKZIdXtCDarPV3+yHh6ozMjs1gYnNzZGX55N/jC uUYwvAPm+GfHzqLIk8lw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ol5AO-00HHHR-BB; Wed, 19 Oct 2022 09:15:12 +0000 Received: from mga02.intel.com ([134.134.136.20]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ol59B-00HGGd-6v for linux-arm-kernel@lists.infradead.org; Wed, 19 Oct 2022 09:14:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170837; x=1697706837; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=QeLyseBRR5vdFFcCj6zBy2vHybO02Bt4+xdUVAJfGkQ=; b=FeexKKqKB+Gw6tS7E+d6ATYSj+2UzgV1vrs87doC8DNYQyc/cV5kDc8M XpJXnc+0igVVAQxN0Ah/81r/IDwPGsthm5fVhLDRJ/PYZFS3icHMmwp0f Sm/dhRHCyv6n7WKoXCEsVX0Fg8A6Dpz1VAvQdznVnNEMeAkyurKIyHhWk ltRu6aNyb/GUxppipD5/qSSQpcnhxlFUehFYGyUbBh2+c2cm3lu2qlLoC UiWJhx99CEssvEDAUlNjtwps+LBWk1oZwYi7bl5zo7OipK9qXVOOn5pCz 9lZWigFfGx/wp3jCPBc/zpzHbMBLmY5xNTy3igOCG3//rA+EWW4lxZml5 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="293751044" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="293751044" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2022 02:13:56 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734119081" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734119081" 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:53 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , Krzysztof Kozlowski , Alim Akhtar , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= Subject: [PATCH 28/44] serial: samsung_tty: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:35 +0300 Message-Id: <20221019091151.6692-29-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221019_021357_345925_6A21C636 X-CRM114-Status: GOOD ( 12.95 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Reviewed-by: Sam Protsenko --- drivers/tty/serial/samsung_tty.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index 77d1363029f5..7e34361a1085 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -288,7 +288,6 @@ static void s3c24xx_serial_stop_tx(struct uart_port *port) { struct s3c24xx_uart_port *ourport = to_ourport(port); struct s3c24xx_uart_dma *dma = ourport->dma; - struct circ_buf *xmit = &port->state->xmit; struct dma_tx_state state; int count; @@ -316,8 +315,7 @@ static void s3c24xx_serial_stop_tx(struct uart_port *port) DMA_TO_DEVICE); async_tx_ack(dma->tx_desc); count = dma->tx_bytes_requested - state.residue; - xmit->tail = (xmit->tail + count) & (UART_XMIT_SIZE - 1); - port->icount.tx += count; + uart_xmit_advance(port, count); } ourport->tx_enabled = 0; @@ -351,8 +349,7 @@ static void s3c24xx_serial_tx_dma_complete(void *args) spin_lock_irqsave(&port->lock, flags); - xmit->tail = (xmit->tail + count) & (UART_XMIT_SIZE - 1); - port->icount.tx += count; + uart_xmit_advance(port, count); ourport->tx_in_progress = 0; if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) @@ -916,8 +913,7 @@ static void s3c24xx_serial_tx_chars(struct s3c24xx_uart_port *ourport) break; wr_reg(port, S3C2410_UTXH, xmit->buf[xmit->tail]); - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); - port->icount.tx++; + uart_xmit_advance(port, 1); count--; } From patchwork Wed Oct 19 09:11:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ilpo_J=C3=A4rvinen?= X-Patchwork-Id: 13011512 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 98CEDC4332F for ; Wed, 19 Oct 2022 09:16:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+4wmObwss7Gg7OO7jFA7LGSjjzLSTLBy/QXfZVQ5aWE=; b=n5m5yhrSx5J98r zwYsgja0W+C/gUQUlogY6EU4tvkw42gD5Tapxl02ZVH89+RzseEuZc15KqrwmzHWI7keNYfKUWQdE KG+XYi091UvyqrgedA4QjhcWGLB0EJF6jpV7IYMYSBKbupbErN3Ev4+6SG77pRn4UI8AlFApViyvQ USXHz39R1hBkcdbOnKhAt0TV3MJfWsmwK4fuBaEcSNOAuNnPItZ/G/eENq+HvZ+q4iGLuzz0SdHmA bYvh+I/GIbPFR1rWTlp2vI7LrpQQeG8w/YYva/1WuespIsxPqYrK0vgWczN+vQRdRfD6dvT3wQHr1 kD6O8s+AYLlhQYhxJzzw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ol5Ag-00HHV1-FV; Wed, 19 Oct 2022 09:15:31 +0000 Received: from mga14.intel.com ([192.55.52.115]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ol59V-00HGYv-K3 for linux-arm-kernel@lists.infradead.org; Wed, 19 Oct 2022 09:14:19 +0000 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=VQJoRuNRdeIpnDk2ac87eJh17oqgdcNVue8yLDhtyxs=; b=beHh8wt1lBKONMEdm1ksp7YzMK6XVmHkp/1Ii6Y0qrUkF/DxnTf7bJks SGHy3g1Y33pKo9duwQP64ucO8d6GSrs59/vhGSsbUINehzQcLJsJDIQty ZZbdBYkaDBEk97Got9mL1SzJ60WbP87quY1fcBeYgmV3eDHKYjkzBVryM lgw/R75URgnxucxci7TQ6vkho1chQhprcpakaoqxfEhhfY92oJECo3Ig1 1l+XKXptVOdNpK7Z9bG4HPksBTSRGGaoQMRNpU3tHZ17nYS10ysGSSDW2 Q9obSttq1YeUlXdlBcESPVatqLQ0GkdTfJ1bpmmQIKN+ZkushGW1IsyHI g==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="306344613" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="306344613" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2022 02:14:16 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734119215" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734119215" 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:14:13 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , Maxime Coquelin , Alexandre Torgue , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= Subject: [PATCH 34/44] serial: stm32: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:41 +0300 Message-Id: <20221019091151.6692-35-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221019_021417_703103_CDD1FFCE X-CRM114-Status: GOOD ( 10.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/stm32-usart.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c index dfdbcf092fac..24def72b2565 100644 --- a/drivers/tty/serial/stm32-usart.c +++ b/drivers/tty/serial/stm32-usart.c @@ -596,8 +596,7 @@ static void stm32_usart_transmit_chars_pio(struct uart_port *port) if (!(readl_relaxed(port->membase + ofs->isr) & USART_SR_TXE)) break; writel_relaxed(xmit->buf[xmit->tail], port->membase + ofs->tdr); - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); - port->icount.tx++; + uart_xmit_advance(port, 1); } /* rely on TXE irq (mask or unmask) for sending remaining data */ @@ -673,8 +672,8 @@ static void stm32_usart_transmit_chars_dma(struct uart_port *port) stm32_usart_set_bits(port, ofs->cr3, USART_CR3_DMAT); - xmit->tail = (xmit->tail + count) & (UART_XMIT_SIZE - 1); - port->icount.tx += count; + uart_xmit_advance(port, count); + return; fallback_err: From patchwork Wed Oct 19 09:11:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ilpo_J=C3=A4rvinen?= X-Patchwork-Id: 13011513 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4110CC433FE for ; Wed, 19 Oct 2022 09:17:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=He0bCrO9jipwM3gARQulnISNWFYvGmHcG8ber+b4lJI=; b=ONZGWyPgJHUOyF TGuu9P8/MS0i7nm20RWSmDdyxgMRxJlto9hQi0M1Q5yAv3y1LAtQx0Ewl1C6kRrfOzm3piogDFo9K dUG2xJx6FeYf0vxMcwgGPHCDhtMIgnT/T9ywS0LCwodMYH4QCIJyoNPlv1aJ0gs40zTHahKRiMrkS v8uY5MY+FBmTRP77mopsfkFdvIsKMvzYGGooa24Tp4enh1K8Sm0mX84OywU5qbWPgNY4IhjqKdakL ouNNtLsMClQVdcKh7s9LOTNHNeSXKutVLYmKGjEFibAjL2n8TQAE5WIg0B3xXchkLdGXpfQQpV/FG 26dXcqVqAHy5JPY0+Akw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ol5BC-00HHvM-La; Wed, 19 Oct 2022 09:16:03 +0000 Received: from mga03.intel.com ([134.134.136.65]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ol5A4-00HH3H-Mu for linux-arm-kernel@lists.infradead.org; Wed, 19 Oct 2022 09:14:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170892; x=1697706892; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Vdv0VnfyYwVYEDCfG1dVBcwwKynwA8leh0TjEqYcP/I=; b=nPELrnI458rtLPw+qNei9E4lS3goEr/AG7Yv8mPpmDbr2R/OiFlesPtO 3PPNGwleV849c8i9z/kk26nTkYnUBf05bs4F47t944XT79M82UkD2DdNC JT1xgGihtByaFHJPDrj9t+Eg3B02KtIfAl8dm+3d+QQQHDmwfw2wxT4Y1 3vUXm5oZdun/9Id9vwYZ3dgIaHD0hnIKsNyerMYwWvtmA8PwfQPFtgzV7 hVfd8OswJD+JOTonDkVPqkJpUOK8d1AcPC1IETKUMDEI4uiSmc8xR0V0N xb6kUNNwo432CCcty4YdU0PjWsTYTbz7kOjlp1FDtAbs3F4kXebdbGkuE Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="308041711" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="308041711" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2022 02:14:51 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734119391" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734119391" 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:14:47 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , Michal Simek , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= Subject: [PATCH 43/44] serial: xuartps: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:50 +0300 Message-Id: <20221019091151.6692-44-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221019_021452_821346_DC197168 X-CRM114-Status: GOOD ( 10.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/xilinx_uartps.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index 2eff7cff57c4..01d8027e64fd 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -326,9 +326,7 @@ static void cdns_uart_handle_tx(void *dev_id) !(readl(port->membase + CDNS_UART_SR) & CDNS_UART_SR_TXFULL)) { writel(xmit->buf[xmit->tail], port->membase + CDNS_UART_FIFO); - - port->icount.tx++; - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); + uart_xmit_advance(port, 1); numbytes--; }