From patchwork Wed Oct 19 09:11:28 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: 4979 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp227154wrs; Wed, 19 Oct 2022 02:47:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5bR2tLk7kL169hhxuUX720aHdFyTi4ZMIGuQZ8g/RnpV1Kgqv5e2JpEbh8AI3IGxXytL8V X-Received: by 2002:a17:902:7e8e:b0:182:25d6:e65b with SMTP id z14-20020a1709027e8e00b0018225d6e65bmr7558778pla.9.1666172877511; Wed, 19 Oct 2022 02:47:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666172877; cv=none; d=google.com; s=arc-20160816; b=wGDf/JXF1CvuhXlAWp74C1DqfWVB7kcDpsKNRU5HBFEh9On+wgYgD34qp8SoD28KPc CT8O3LNn7CDRQvdCSn0u9kG8Ae8pmwDzhOQ+jRVl04CxvT7WR81qF27W622xPhCkNr8k C2QXt72RBvdslmxhhZ/uI0DMBzLRi2zMh2nKHrqwIFzxum/rX1F88P/+gmuYmUsOFfVg biKFRE22K9NBKuFY+GAJf1jXj3g8muQN+PLmQ4dp3LfFJ03JIFL4Qys7+Q3UyiMfoVRJ XzIO5zCt0R7e+NMbjAvOPjCxmJfHqQaHlUKJfkaXlK63bE0m3UtQ6Ax7Wmn64T08Khvx 8g2g== 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=KBxGsetvg6/6867dncXqj+r3TfS4HVVu/DzZynIjwrU=; b=jXY3pBxRaGItIobp1AQsAc+WnlSgRSR/hyzc9ZcUdRktCYqCbU3P57jaQfFXa17xzP h4YATvUt1DOUTKKQyY9+2e0fGqv3GQP0A3BtPzxSTKFmNdikD/T/XxEQ7UhN8W6RVLs0 aIQTk35cbOWDhZ4O+sGDviVzpYKs2dsQxHnnXh9fL+9EnWqJruwMcyxBjKLIwFwBcKWO yZQkvqyGV4WIqWpgdxXZuzP8y+tM9ihBM/HuEeyRonA0p3K7qwCHaZTVdyhxWep9ShYV r/2l2JLCoymhwD6S5AkqtphCWgLyikiIa7QV2/0bKrSkUxHKG0pAA8MORGek1E9JiW/J RvxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=alNa27zO; 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 p21-20020a63e655000000b00438766f903asi17501308pgj.490.2022.10.19.02.47.43; Wed, 19 Oct 2022 02:47:57 -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=alNa27zO; 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 S234112AbiJSJij (ORCPT + 99 others); Wed, 19 Oct 2022 05:38:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233811AbiJSJcq (ORCPT ); Wed, 19 Oct 2022 05:32:46 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A45E6346; Wed, 19 Oct 2022 02:14:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170885; x=1697706885; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=aLYObC9U/DR0Hgv0THbcZXkz+Eua24UBLPpkAlAvhf0=; b=alNa27zOJejvK705H+qsqqVbm9jIm0AQUzDJhC4Y/B3WgMYw/Z26Yk+R jO5/rzuFHEbrAsbuZM3qkruXSsnfOTmrwxi2ffBD/OzYa9Eic/pb549l/ zuky81u4dign7s1fEEgkFCd1pnujdy3N8skmucz3IQ3ZOcakSqiDEk/xh 0fxHx+zGYuOlKsE0y2/OtUF/VNva2K0C+4Gwa+TY9tSo8F/JHVbwnZ3Dc yPZatgRBYaX4spYoF6lRCJWQT3fzFpQrDNs0FSsh1BogtPWjke3lIh4bs 90HGSMzPtFWwcl9qSvUB9YONOuaFW2GEq0BDVb9CM33pcoAAFgfAQZDY7 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="332911038" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="332911038" 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:30 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734118868" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734118868" 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:27 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , linux-kernel@vger.kernel.org Cc: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= Subject: [PATCH 21/44] serial: max310x: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:28 +0300 Message-Id: <20221019091151.6692-22-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-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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747108891032399263?= X-GMAIL-MSGID: =?utf-8?q?1747108891032399263?= Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Reviewed-by: Andy Shevchenko --- drivers/tty/serial/max310x.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/tty/serial/max310x.c b/drivers/tty/serial/max310x.c index fbf6e2b3161c..4eb24e3407f8 100644 --- a/drivers/tty/serial/max310x.c +++ b/drivers/tty/serial/max310x.c @@ -787,10 +787,7 @@ static void max310x_handle_tx(struct uart_port *port) } else { max310x_batch_write(port, xmit->buf + xmit->tail, to_send); } - - /* Add data to send */ - port->icount.tx += to_send; - xmit->tail = (xmit->tail + to_send) & (UART_XMIT_SIZE - 1); + uart_xmit_advance(port, to_send); } if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)