From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE86AC4332F for ; Wed, 19 Oct 2022 09:37:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233852AbiJSJhn (ORCPT ); Wed, 19 Oct 2022 05:37:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234117AbiJSJao (ORCPT ); Wed, 19 Oct 2022 05:30:44 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83EC7A4867; Wed, 19 Oct 2022 02:14:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170855; x=1697706855; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cX8zPBsZxBjrMLtp4Sd5J6asiCWO7iBUnX8BtEDvIS0=; b=nTExoDSWYMPSnGw+TN+1hO7B5IKTZ/SfVrTxZcmfco2jvVLGkHc5bsHp iFiiFGn7jh6ot5tQ5HV92/aDTF4Pw6nbknfSDRY5IGjYjBxrCqh0yDY58 1wmGYmP7744BI6Lkwp1Qsc6VXiOUDEdHmYecMsNHbZZk0f1e3GX/BLeQR nk1fdOO3KaHd1br0zl5Ry2ib+hbQuBAA0AkJPXncjc4QvBXRE3AMmn1LA lgIq8tcb91H0qzrtgDALkrhQn0Id7b8iFsc+uNQwU29hPpdQfUL1GWYRj CW19TDjR4QrMvR/JNtSrAy+YDdLVERee7Uf8Bt6JGi1pU7wvfKCnA8DuT Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="332910928" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="332910928" 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:04 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734118710" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734118710" 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:01 -0700 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , linux-kernel@vger.kernel.org Cc: Andy Shevchenko , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Subject: [PATCH 13/44] serial: cpm_uart: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:20 +0300 Message-Id: <20221019091151.6692-14-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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/cpm_uart/cpm_uart_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/serial/cpm_uart/cpm_uart_core.c b/drivers/tty/serial/cpm_uart/cpm_uart_core.c index b4369ed45ae2..5565f302cb21 100644 --- a/drivers/tty/serial/cpm_uart/cpm_uart_core.c +++ b/drivers/tty/serial/cpm_uart/cpm_uart_core.c @@ -684,8 +684,7 @@ static int cpm_uart_tx_pump(struct uart_port *port) p = cpm2cpu_addr(in_be32(&bdp->cbd_bufaddr), pinfo); while (count < pinfo->tx_fifosize) { *p++ = xmit->buf[xmit->tail]; - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); - port->icount.tx++; + uart_xmit_advance(port, 1); count++; if (xmit->head == xmit->tail) break; -- 2.30.2