From patchwork Wed Oct 19 09:11:08 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: 4952 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp226463wrs; Wed, 19 Oct 2022 02:45:59 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7ppLLxO7N3QAxcgQXfwRZsHQPf5Sfgo7tHRSzXkYdATJs1ptN38CWtSbnF5odieXhKHxBn X-Received: by 2002:a63:515d:0:b0:42a:cf33:4320 with SMTP id r29-20020a63515d000000b0042acf334320mr6321665pgl.21.1666172759569; Wed, 19 Oct 2022 02:45:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666172759; cv=none; d=google.com; s=arc-20160816; b=c7inrM4uwuukv+Y+czjIJ+5hQ/ayw6xLheffd5sMnWqu9H7uZK6KMtHtOY0dxd6SAM s6AHlZnd4oRcBFlSTCBBne/BEhb0kE8UqQ3GeEbTJihK11slfhD8ze9hpFszZvsS7+TR UjygCTi+YZp6yuNC0L39+EHrybAb+EoK3Jrq6Hr7ylS2lH1j4+RczC1mz7gX7stC/VdN 1YBWzANzrV0okxUayLstgbUN56Aez2gcrsvmb4n67Oi3BuURCaz7W9RM8z6nqyfWxlMD SlgOJ5E2tKul9I6ksWsZPciRgL+aDJF0rntqxBGGhukroVq9phF3Cq6DSyT4z8ZoyK7B pBHw== 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=tjNAkh7FqVY+dwAGO7YlmBRcun8rGEWhMCDrJ4nEQzY=; b=TAfB2YUCXV2PGTwzzQRNs+WckaM73Ygj/n0SRehDq2cTjJFVK0bYMiIpaF07dlRUul 5SVmvKPMfdy9gefCS2xBc0S6WvTJuofpFcAJU0gxeUTzkzsQypKTGRk8RntOX7XKd0Ub 2sTOU9WYlEBGV46TSuo1srXrBx/d39Y3Ou4bhKiM0ir5wws1AsTvk53w/ZQBAODG88lx NMyj5yQB0HPM46vJgnbDhQIIGdx8LRQv2rCtteyvTKIqnEM1s+xI9TYt0BvsXdywJyoO 57J2dDQoYmeN7yR8GivgFjwxCr0KQFAH/YWo6NnXqEI/2JzY6b+cXGvoG76tY2Trigxw lEyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="XXbf/XZ3"; 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 r3-20020a632043000000b00438894246e8si17233705pgm.169.2022.10.19.02.45.37; Wed, 19 Oct 2022 02:45: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="XXbf/XZ3"; 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 S234103AbiJSJew (ORCPT + 99 others); Wed, 19 Oct 2022 05:34:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233821AbiJSJ3d (ORCPT ); Wed, 19 Oct 2022 05:29:33 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74A2CEB75E; Wed, 19 Oct 2022 02:13:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170788; x=1697706788; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dp4IHVx98V/WVUXsszi1UUqLShoGIXwdHa728DHztS8=; b=XXbf/XZ3xwslhU5RtPAE4h03uob49paNDlBvqodSzc6sxAJb6o6SPamp MnX6qrSdfQmLWwFDHmyNkEf3lIa68YhFXhXIdfFVIaJIoSzSU7c3Me2Gb y9qkdLn5shhr+CxhVrcgW5O4Ori2Dhmfk3zUcFsRBdG1o9pXJeGgDxsTa yzd7hGINtU9RFWK4DPu75Xy9UJJFSihEbAiAU2Jf/qpF4wawLZ1MdHRZh li4q1C2DjWFL0sqNjsanUUdffa3B1z0ps4OKOhNPFAuVASZBQJeoM7uKW sKNIUaN17bOnOSkNdO1EKyrChS0v+5p8kTHamBQ6U2MTa1J/8OolJEWc4 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="332910778" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="332910778" 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:23 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734118439" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734118439" 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:21 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , "Maciej W. Rozycki" , linux-kernel@vger.kernel.org Cc: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= Subject: [PATCH 01/44] serial: dz: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:08 +0300 Message-Id: <20221019091151.6692-2-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?1747108767674980898?= X-GMAIL-MSGID: =?utf-8?q?1747108767674980898?= Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/dz.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/serial/dz.c b/drivers/tty/serial/dz.c index 829b452daee9..6b7ed7f2f3ca 100644 --- a/drivers/tty/serial/dz.c +++ b/drivers/tty/serial/dz.c @@ -279,9 +279,8 @@ static inline void dz_transmit_chars(struct dz_mux *mux) * so we go one char at a time) :-< */ tmp = xmit->buf[xmit->tail]; - xmit->tail = (xmit->tail + 1) & (DZ_XMIT_SIZE - 1); dz_out(dport, DZ_TDR, tmp); - dport->port.icount.tx++; + uart_xmit_advance(&dport->port, 1); if (uart_circ_chars_pending(xmit) < DZ_WAKEUP_CHARS) uart_write_wakeup(&dport->port); From patchwork Wed Oct 19 09:11:09 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: 4908 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp225696wrs; Wed, 19 Oct 2022 02:43:46 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4K1cD9kbqLElw9eR08tVqSQ5Xc71Oyxz9mj/TdGJv4NAA2pwBc9brhdUmGd8aZqxpSEPZD X-Received: by 2002:a17:906:cc0d:b0:78e:2c06:8e70 with SMTP id ml13-20020a170906cc0d00b0078e2c068e70mr5817676ejb.732.1666172626638; Wed, 19 Oct 2022 02:43:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666172626; cv=none; d=google.com; s=arc-20160816; b=JCuP/Ss8xuEGBnyjH+/fW0vHvts2X9PauN4o8+cg6fQ7ZCJJP+lz2YU8JmgmyCJveM Skt8ZL+zt+MXCiejZHr2SxxCG4IWxctarIsD2Xbhe3D5aLrIDw8l6fsdP3R8X8Lrsd4W BHFtR1yeE3GsyK81mLNIok0EEU5wLsm+AX7cqzprtcsO7gUD0Bz5gdIU+L2mBCzoMUnh xB1G28x06xJmaGNgJE3wgws4rfmdNk+Odgw7YDxH3kSbbZpbv4UqFHyJJ/5jZD8CIw2/ 7LSqffHg8BBG9CXBoz1ge1gT1cn8GK5+nXkFMd2l3TqH2on8asrNJJfdMwHrZAcD7EMz kj0g== 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=M8mop3W7fh49XokRxvlG36xgPLBJekck3G40BK258Hg=; b=BTHP1/oW90iANFD30VY0d7lBsYmIeE4f5OWRg39h5m4XMXxa8rUjcDORujDv0JxvYd W62LTN9/fYRe+m+881p8urUMhHBYxdmDKx+KnUYF8cUBp93DAyt/8qUzUKk3/LBmyGBR R+ZcnNzN6U132LVo6elIedvpa07rvwPZxMh4tK8KwobpiA0DhUOf0DYu5HAugg926IBk LLY/JClC5He9Bc8u8jn1HnRe8b4XlaABIKgB+ob/XNfPauqeAx7SX3GLyllKaCFhCI2d hEztQfYouKuixCX5L6nAtfP/YegtY+rweb6VxbPvbtstBIJr6fszTH9hsKTarYSMAgMY RETg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=drsyqGDt; 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 z22-20020a05640240d600b0045d5a712e82si11608920edb.586.2022.10.19.02.43.18; Wed, 19 Oct 2022 02:43:46 -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=drsyqGDt; 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 S233933AbiJSJeE (ORCPT + 99 others); Wed, 19 Oct 2022 05:34:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233768AbiJSJ3W (ORCPT ); Wed, 19 Oct 2022 05:29:22 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28C95E5EDC; Wed, 19 Oct 2022 02:13:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170790; x=1697706790; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=qrCiMXb9nIBi8SbFsqfFGy4xfI400zKingaQZRHYCPU=; b=drsyqGDt9pDa97KmeOUaVYWP76tXlJ0HRQGywpI5WNTF8SJs42z3TLOV j+HsdxuTOuyuXWzgl69zNKT4SKZ/h8QwMTB+noJBu6rrKo5nNNvJoYMwo ZcavpB+CdaTeBEDIYFFkSrDEjaW1VB+SyC3u+xL8yn1LNk6VarqfIvGt5 7K48T+1jBJdiJ2LzxWHRVkkV1im1nGEQQ2073qGBLspslUA68trnvGvdi XtPOc0E4AAj/5wbOucw5e165f1JCJ4Jqv9Xajw48TydzVt4nH96poTtY+ 3kc15XiU+QgXnsnteDxNFDmOPmgXURzLf8IuRlFl8VoNwDXKY/xLbMpTS w==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="332910790" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="332910790" 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:26 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734118459" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734118459" 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:24 -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 02/44] serial: men_z135_uart: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:09 +0300 Message-Id: <20221019091151.6692-3-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?1747108628384529871?= X-GMAIL-MSGID: =?utf-8?q?1747108628384529871?= Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/men_z135_uart.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/tty/serial/men_z135_uart.c b/drivers/tty/serial/men_z135_uart.c index 3690f5cf0f43..d2502aaa3e8c 100644 --- a/drivers/tty/serial/men_z135_uart.c +++ b/drivers/tty/serial/men_z135_uart.c @@ -352,11 +352,8 @@ static void men_z135_handle_tx(struct men_z135_port *uart) n = min(n, s); memcpy_toio(port->membase + MEN_Z135_TX_RAM, &xmit->buf[xmit->tail], n); - xmit->tail = (xmit->tail + n) & (UART_XMIT_SIZE - 1); - iowrite32(n & 0x3ff, port->membase + MEN_Z135_TX_CTRL); - - port->icount.tx += n; + uart_xmit_advance(port, n); if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) uart_write_wakeup(port); From patchwork Wed Oct 19 09:11:10 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: 4940 Return-Path: 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 + 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 ); 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?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , Andy Gross , Bjorn Andersson , Konrad Dybcio , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= 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 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?1747108727869333808?= X-GMAIL-MSGID: =?utf-8?q?1747108727869333808?= Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen --- 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; } From patchwork Wed Oct 19 09:11:11 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: 4910 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp225720wrs; Wed, 19 Oct 2022 02:43:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6ijWJiwmpwKor7Hy38YX5wNddi+kk1z5ze0Cg76OFSIOr/+EonU2wr0+3Y8874Sik9pUqX X-Received: by 2002:a05:6402:274c:b0:45d:4015:cd8c with SMTP id z12-20020a056402274c00b0045d4015cd8cmr6754696edd.268.1666172632067; Wed, 19 Oct 2022 02:43:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666172632; cv=none; d=google.com; s=arc-20160816; b=qnc3Zs4XAqP0ThsDwKVf8+LdtC/2MRr5blKe9qjRMfzGZdAOVerL2/Y4j34S+LTvvJ ShUtYWxp7G+/ToLapZVaNftZFlnyKDOxYKVNsbdSEj6LMZLurwSA83/yflFyBdy+Y+Xg Lf3sqscPAhSvMnDRFyc5KfV+T3ZdJNIgpmcFPtYeytMKyYuuqPQmIiHxSPfQEBLwRCwr fEwaoS7bL9pZQs7DUfELFUlO5pKjkidE1cLSaNQh2zUBd9oSkCJAllHPqZgamMqgakIO oVI9p0V7B6G9sawBo7JfSAA71QOlMKauCgiuvQiVoiNVwhT9TW2KHnwPgCc3FI6NWesl g35w== 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=ZKeejLXpKyh4wOgADm6zZg6h936pNnAecDlMEDpdllo=; b=QmMNF3c/qelGQXqGSxal9O2BlzYjtCRIEd2rxZCjVG2/bdpLNmvaTn/KMPaeynn+hW ipqGns5Bbau91UMIipPB/L56P5nZ7JbX5c/1F+P86WGutRRnCYK3LnL13okJm4d2qAea ZrTGVaOam+bk+Sj/SDaVUfbj9uv4spCFFlCxzNJSyOq/UOku1cT2Zk6s+0mPELmks0wd PkOn1SPrVKZ94Kz8HpwVv2MMu/bFIwD3Fal8l34lT67DIUQsH0F2PNcjVunMhwmgiGTx Imwal2lzwvFq8SkSAmQvx1SIeUGmNUGWMsRl1B0aHizIwj6sC4FP+7jIgDXfC+pttGOE ytxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=gTzkuGO5; 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 d22-20020a50fe96000000b0045beaf03ddesi11878863edt.411.2022.10.19.02.43.22; Wed, 19 Oct 2022 02:43:52 -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=gTzkuGO5; 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 S233801AbiJSJfU (ORCPT + 99 others); Wed, 19 Oct 2022 05:35:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233850AbiJSJ3j (ORCPT ); Wed, 19 Oct 2022 05:29:39 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4E47EC500; 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=1666170794; x=1697706794; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=hTprBOiynTEpT508TKZJXu6vmpZ3D1X3CSumF2lsD10=; b=gTzkuGO5vAj2/5Mu8v0Ga4nofIDILpjOheqb95/idfHUkPKuCz3M/PQw X8cBPIxiIKj50FV1w1W8wlXwkEtNqPhynEASi2XeljqAsnuExzrH0NtZ0 qdNwpV45xLYeKHiSwPU4hwuPfeV1HCD7SRJ+3uC5Fm0Qm4/E+7N88NdcN uLGkSQ+EReKv91GLEBxMQCfTYfUwA5WTn2XHYgTLxVVRZqRUS0GMI3Fa3 Iw+OHeaNtIIDDAJ1La7KRsYXe7EKBS6DGo6RIS7466zC/rQM2hER+bLe5 1wyBB4iMYU9KA13fc523P9uhCa0jQABLl4ofL1lBIvZvKlQ4afHxVeTj9 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="332910821" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="332910821" 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:34 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734118499" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734118499" 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:31 -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 04/44] serial: pch_uart: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:11 +0300 Message-Id: <20221019091151.6692-5-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?1747108633332095428?= X-GMAIL-MSGID: =?utf-8?q?1747108633332095428?= Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Reviewed-by: Andy Shevchenko --- drivers/tty/serial/pch_uart.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c index c59ce7886579..c76719c0f453 100644 --- a/drivers/tty/serial/pch_uart.c +++ b/drivers/tty/serial/pch_uart.c @@ -738,15 +738,12 @@ static void pch_dma_tx_complete(void *arg) { struct eg20t_port *priv = arg; struct uart_port *port = &priv->port; - struct circ_buf *xmit = &port->state->xmit; struct scatterlist *sg = priv->sg_tx_p; int i; - for (i = 0; i < priv->nent; i++, sg++) { - xmit->tail += sg_dma_len(sg); - port->icount.tx += sg_dma_len(sg); - } - xmit->tail &= UART_XMIT_SIZE - 1; + for (i = 0; i < priv->nent; i++, sg++) + uart_xmit_advance(port, sg_dma_len(sg)); + async_tx_ack(priv->desc_tx); dma_unmap_sg(port->dev, sg, priv->orig_nent, DMA_TO_DEVICE); priv->tx_dma_use = 0; @@ -843,8 +840,7 @@ static unsigned int handle_tx(struct eg20t_port *priv) while (!uart_tx_stopped(port) && !uart_circ_empty(xmit) && fifo_size) { iowrite8(xmit->buf[xmit->tail], priv->membase + PCH_UART_THR); - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); - port->icount.tx++; + uart_xmit_advance(port, 1); fifo_size--; tx_empty = 0; } From patchwork Wed Oct 19 09:11:12 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: 4901 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp225570wrs; Wed, 19 Oct 2022 02:43:26 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4ieVnHhW56lfa1F+dF10o8cE5MQZ15YuUAbqnzU8BnmO52ObvZtylRSUCPpZeOwFxkYdPl X-Received: by 2002:a17:907:94c7:b0:78e:1c4f:51f9 with SMTP id dn7-20020a17090794c700b0078e1c4f51f9mr6200712ejc.200.1666172606044; Wed, 19 Oct 2022 02:43:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666172606; cv=none; d=google.com; s=arc-20160816; b=ka8+/HNDl9dW63JDbfcWCv1jRp7mLkOAXZZ+ukSbiDxQFYaqb18+WVIbgZkMXlpuGR 1AjouXqEwAfYOCPSAaXowvK7TNUGG2B83R/tCw+O4d2rONVQjnjDJJ5exhuQ66o7tANC K0H2YIGLrbOmqfDBG+2wDqKukWAm49XGngCghuS3oNjrbL/cbXfR8n9GuZqyFoF7kRRf tjwGwnThipIvVJivoYxZP+kCHO8QfVB0UcaROQM9jq5bpcT8byn8sd0NxaKBwveWt6rz PAGF2C8/eXMEPG4Eg9AIRJ1cdhlqjms1xBU7fnv0yWuJnewzAokaDT5n7+jX3IRXGfS1 2PWw== 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=DveqZnYPm6oYyUaPo4K0/uNs5moYlu/PFkPsO5dME0k=; b=S46vkjW/ne+WMraY5/Ce4KdzkVV8t2BkJNUhzGuZ0F3GG0LCaSc0K9I4ubja6CIuzZ 3u47ppYjW1o8Y89fE8TEoRIti06+ZatFuYx1DkmYPb1RLq8dXEpX6Ep+YWw27XEWT+GW 4o5JHveKzCgVTHD/axRE0/F5wY3RGsonwpa5R02hSGR+XvJ4XFhcAlZO0fJ+73KDXEN3 J76NeJP3fadTBEog/RCLoy1sG7MaIgElK4E+x0MZjFkowvxU3Sycgyc3Mo9YP/4lVSuM mxDtrUXedKwhqt73t+/Ic97IHEAYXLaM3NYdphemFAPyGFnL8bR5QWgN/23tw6IYvYOk fZIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=KEekfN5l; 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 md8-20020a170906ae8800b007828388864dsi10807182ejb.692.2022.10.19.02.42.58; Wed, 19 Oct 2022 02:43:26 -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=KEekfN5l; 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 S234088AbiJSJep (ORCPT + 99 others); Wed, 19 Oct 2022 05:34:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233817AbiJSJ3c (ORCPT ); Wed, 19 Oct 2022 05:29:32 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 401E3EC517; Wed, 19 Oct 2022 02:13:19 -0700 (PDT) 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=RMQyUAwZq9Wpdc/2bfyn+pazMMtywAfzIt336FID/c8=; b=KEekfN5lPY3vJpYeI7daE74zTvO2ZcyKUDstitQGnNDzIgGzwBtyWDRu 01qTfm9EjqBSfW7eBDb0NkObfYpRK58i/HjwW5hoQPDXlLOCz9ldP3K7D ep2vYH4cEGO+OdV1TzfS3EtK4lbnTUPGQcjXSb6zdWhzIEji7CDh7uqok U50wpYvfZDt5sU309aD6N8G2r1seADGwyfyuUSPTiLT37U/qz7AWxo2um M7p4sGKuQfF459rPfkIUx3CsPiab+UTF/mjASBvVLnauZR1Bz29fE8maf nwBmW7RurZUthGMeffTmMHclA5g38RYingTbdiBBzt/HuF41V86pNF6qe w==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="332910830" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="332910830" 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:37 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734118520" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734118520" 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:34 -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 05/44] serial: sc16is7xx: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:12 +0300 Message-Id: <20221019091151.6692-6-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?1747108606760014354?= X-GMAIL-MSGID: =?utf-8?q?1747108606760014354?= Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Reviewed-by: Andy Shevchenko --- drivers/tty/serial/sc16is7xx.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c index 524921360ca7..39f92eb1e698 100644 --- a/drivers/tty/serial/sc16is7xx.c +++ b/drivers/tty/serial/sc16is7xx.c @@ -686,13 +686,10 @@ static void sc16is7xx_handle_tx(struct uart_port *port) } to_send = (to_send > txlen) ? txlen : to_send; - /* Add data to send */ - port->icount.tx += to_send; - /* Convert to linear buffer */ for (i = 0; i < to_send; ++i) { s->buf[i] = xmit->buf[xmit->tail]; - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); + uart_xmit_advance(port, 1); } sc16is7xx_fifo_write(port, to_send); From patchwork Wed Oct 19 09:11:13 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: 4953 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp226465wrs; Wed, 19 Oct 2022 02:45:59 -0700 (PDT) X-Google-Smtp-Source: AMsMyM48LhZD78lFTiBC1IYYTXQmvtnz1GRUIlrCqC46zX5XFUzpx1JKX1IDpo0oKnEqaNcPCVua X-Received: by 2002:a17:902:ab8f:b0:185:46d3:8c96 with SMTP id f15-20020a170902ab8f00b0018546d38c96mr7777851plr.136.1666172759570; Wed, 19 Oct 2022 02:45:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666172759; cv=none; d=google.com; s=arc-20160816; b=jZ83h6iLvwD4mHlIlQ5H3qcQ5qP6rehWncrt7KcUf84JTqa73VL3MdApsigd+vhzeq PKJLgOR62CvWiLFDk5uD40w0NDpAlK9Uo/5tdE3JeJjfmHKS+jKRZxs69kv40yrAk3MJ Va5TvspqA4Bv1nPbGbULHH4Ga9kL5JqKhOUEfWEZM0VngQLquLsTgkcWLF/+eAUucR1p 6U4hxQZEIXXWcb9h6OjHoaDS/G10gUG51mjWR9dng9Q+8VSKbbQBLfCm6Jcv6Q6Nb6od wzFXUP9T5fF7A3CkdnEaD7sStWYs+wiYd7v0OOSgJJZn0qveeKHf8vZuwnnXsxSBeJiT C4CQ== 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=dRhtcyhdG+W/KHA05eFdaUfNPFVgArnWoyNFOFT2Rq8=; b=PvYT+LgbyupdXXvzn8XjlI4UMw2kaM6Ika9E3UImTXYOU0xmcHaBYlKbl9MJunPNu/ Xxvr0/wyG76d6/ydy9pCSdb2mRqVePJGnuyXWQJ+GB12RIjfUMgIUWRuzS2VsDq1jaYe nLcR8AXAcoWcfOgdV5Ip4QvBVdfqo5uwLwn5ubeQQ+Ox69vnIGQw0Klr38sm1F0bAedN qhqH2Kz+9cMFWlsMqFFY1RawDHYO5Us/LIMagb/vKkN2PhSrJj9dvbbAoO4OM0igMDCm kQYSn8sIKX85Ho20qRnxfbDTa2dy1wxNim1BtfhTKed1PtcrqMxHtkYZ8hQ1sgUmHQXa s7vQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=WwPB56k5; 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 e12-20020a17090301cc00b00176a16ca9b1si19619650plh.529.2022.10.19.02.45.35; Wed, 19 Oct 2022 02:45: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=WwPB56k5; 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 S233875AbiJSJgD (ORCPT + 99 others); Wed, 19 Oct 2022 05:36:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233880AbiJSJ3o (ORCPT ); Wed, 19 Oct 2022 05:29:44 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 299F1EC539; Wed, 19 Oct 2022 02:13:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170802; x=1697706802; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=V8ZLFZd/8WGgIcMM/uBvB3JOVq86tCE6Qkxiiz51C8Q=; b=WwPB56k5+VwK/4kgsp4bSKKoY7VgTul1+KXPRo6JsYtnndnS6GuWSC7E YiPcyEV+/vTF9eMfxnYVQ/a/lpuj51DLmLxmadmIBd5Pok1PPS3m3I5DC PoGVCy6cNDioXVVY/lvFk3S6QGdFy9jNn87G1w8Nufuz09FUhdp7mq1GX t2jNI/vqOcOz23t5ji/pxw9aW+8N8c8pnbNp6jgYUCHei0xgLaYNHtM6w 3JC6rbg3zOqo1fEnCgEW1yOmcq6LKJlpGgSP/vGcUIN9oqrGL/qw1L55u Q1DKBOVtrG/PR0UFVW++TXFSLnMt4lvtW2iUZx5lKqKcR4zhd/YVEYKzt Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="332910845" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="332910845" 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:41 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734118549" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734118549" 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:37 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , Al Cooper , Broadcom internal kernel review list , linux-kernel@vger.kernel.org Cc: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= Subject: [PATCH 06/44] serial: 8250_bcm7271: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:13 +0300 Message-Id: <20221019091151.6692-7-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?1747108767638760547?= X-GMAIL-MSGID: =?utf-8?q?1747108767638760547?= Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/8250/8250_bcm7271.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/tty/serial/8250/8250_bcm7271.c b/drivers/tty/serial/8250/8250_bcm7271.c index fa8ccf204d86..062177b64d21 100644 --- a/drivers/tty/serial/8250/8250_bcm7271.c +++ b/drivers/tty/serial/8250/8250_bcm7271.c @@ -425,9 +425,7 @@ static int brcmuart_tx_dma(struct uart_8250_port *p) priv->dma.tx_err = 0; memcpy(priv->tx_buf, &xmit->buf[xmit->tail], tx_size); - xmit->tail += tx_size; - xmit->tail &= UART_XMIT_SIZE - 1; - p->port.icount.tx += tx_size; + uart_xmit_advance(&p->port, tx_size); if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) uart_write_wakeup(&p->port); From patchwork Wed Oct 19 09:11:14 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: 4968 Return-Path: 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 + 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 ); 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?= 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 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 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?1747108830060576368?= X-GMAIL-MSGID: =?utf-8?q?1747108830060576368?= Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Reviewed-by: Andy Shevchenko --- 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) && From patchwork Wed Oct 19 09:11:15 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: 4925 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp225910wrs; Wed, 19 Oct 2022 02:44:21 -0700 (PDT) X-Google-Smtp-Source: AMsMyM46kSMdlNSPTLQfo9rlK01tzPWl8n37SQ0GWO+yJTTditZ4qvMxgwmaGbwsOKvzt/ozfw2r X-Received: by 2002:aa7:cc8a:0:b0:45b:f851:2943 with SMTP id p10-20020aa7cc8a000000b0045bf8512943mr6677679edt.103.1666172661410; Wed, 19 Oct 2022 02:44:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666172661; cv=none; d=google.com; s=arc-20160816; b=Gv1jWT20aUTzDIvkn3cOwc13KvpojBkUoie3jrr7ypC48WKsl4aJNwrD6ooTa2PwCP GrK90MHqlSUQvPSGsgJhxMy9dDXZDUrW0h9D1PS9JNcBZKwZQt1lXLiTaQhVjw0+uB4j SJ5s1Cz0W7PctC4HUH2gHZaKBE3spJzq5DGA6UzxzFCTJ6e2u+RY3/gqRC+sSvAdwdzZ Pxgtb0QOQZbjrCcDVe0OU3esDmbgCu0P8yf7sr6K3r44KhwNSRC8nqikZZJ9iBYN0tBW 26QOxQsaxkWoINgrUZ9Gzv/j77YVYT8DeFoDUqpJwpsTGAf74fazbKeBbo7WbAJCIN5h q8ew== 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=7UK4itne0G7LivJvOQIx1WDOHESe1hNpfnCJFafGhRY=; b=ld0oJsHWuIC9t6UNcIc16kvp10i2BH/frZoP5qRYwK7MZU4sOPUJMtOidGEzJZGuoE i0GlcUr+83Cben8/was3O4rbzWH/75Kjwp7bQZ28ewup7ViQpiGnayO7NOHIFyfnuH+c eNpq+3zF56WutgWc0WBso1bwuTHWboale/ajiVrp54pEDahOoq/afNs7MCj2a8YTI4/g QQpIGaX0ijoVuogEqGWROTYqmSzHSTidJedFiWnoRffh3pF5q1IJan/5FsurgoSp750h fvSHo19Pb+Gl8aV/DpgI70S2rdyCyYOcGIauHmyE9TooRDOq3ED81JwK0pDSrVhO/gee GSlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=CtM1G1Z2; 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 ds14-20020a170907724e00b0078c3197bf86si12928102ejc.533.2022.10.19.02.43.45; Wed, 19 Oct 2022 02:44: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=CtM1G1Z2; 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 S233972AbiJSJg7 (ORCPT + 99 others); Wed, 19 Oct 2022 05:36:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233978AbiJSJaJ (ORCPT ); Wed, 19 Oct 2022 05:30:09 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36965EB741; Wed, 19 Oct 2022 02:13:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170835; x=1697706835; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KzHpkJi/AhxX/r86weD1fWZDNb+69gyw0uBMHSqrM2Q=; b=CtM1G1Z2z4ab6UTLf7iQkERUd2s9lgcEzYyZlIbxaAc6l6OhGlsbAEgM tJlNK35Q4xliyjyCF3ji+XLFjoB6CIlh0pGH36DkThbODBjRAqbLlznz/ 2gXhD1g/nloFMgtBqq4NNj3bYJGPlAlsRyoPlpL0SBpIoVcunZiBNF5MW yZr95XaK3D0JDl0MLzLO7oLG13jQoNtp1zsu8ZRVdlFYCASP5P0jjz7sC 1aY3TyVY5j1XOgHCGLTKVrzM2swBI1wBgO9VvWcTNTmNkTlT+aIh+mvFg 8ZBKnLZqQs7HbpMAQyvjTe2IbLvdzYn0KF4Goor9LF4EJwZYllIyFV7xi w==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="332910875" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="332910875" 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:47 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734118587" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734118587" 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:44 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , Russell King , linux-kernel@vger.kernel.org Cc: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= Subject: [PATCH 08/44] serial: pl011: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:15 +0300 Message-Id: <20221019091151.6692-9-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?1747108664780268002?= X-GMAIL-MSGID: =?utf-8?q?1747108664780268002?= Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/amba-pl011.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index 5cdced39eafd..6d8552506091 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -677,8 +677,7 @@ static int pl011_dma_tx_refill(struct uart_amba_port *uap) * Now we know that DMA will fire, so advance the ring buffer * with the stuff we just dispatched. */ - xmit->tail = (xmit->tail + count) & (UART_XMIT_SIZE - 1); - uap->port.icount.tx += count; + uart_xmit_advance(&uap->port, count); if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) uart_write_wakeup(&uap->port); From patchwork Wed Oct 19 09:11:16 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: 4926 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp225932wrs; Wed, 19 Oct 2022 02:44:26 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6krgizsLAt0Dm8guzvFJaohPrIkDw6OvP5a8BDmX31tx6AUFbm9yU2wL4mseS23WYlkVcD X-Received: by 2002:a17:902:6b88:b0:17e:f177:400 with SMTP id p8-20020a1709026b8800b0017ef1770400mr7732218plk.72.1666172656312; Wed, 19 Oct 2022 02:44:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666172656; cv=none; d=google.com; s=arc-20160816; b=A/QqG3zTBrP0mzZdQlr4QcNzzFxIbIQ0juQQJiOzG6zM0mXwcg5jK5nvtcKFPtcQ3I 5mzQIcRLDBBaaWG8i9vEYhVmroysI1HpueifBuY++PQI/7ff1p9HF/C4+Fb5Oc3IT7ox Y7LguW/V0mC1N5bLneVy2O9JOx5wwbzCPWp9STCRBwnI9eQTAyE6tcTVzWgYRG1KefA/ SlJiINew2+9QDBpPniRDphUK1k8CLvS8+7wf9k619UQeKr2ceHuymGPLph4EH993eh1t hacWpKro+L4kZvMFt2cWxySRafe+M5ftJuTB68m7YWIsEBBY+8P8lquuIhigJS5wcVfX xklA== 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=bzAaNn/LBtJAVKOZHIkDvNZZ4k8Xlx2/yfQORHl/AO0=; b=cCpU6zAf27frpg3kvTC2drVzQIFzBpUsntcfCn9EGIi5JPH3ubvSWprleWItO7H0jE fZRJcbkWaOq24pU3/kvs/MuPiJhxKqI2l9SLe1xeZvHmnNZrfJdnjhAZmhwI+spKXw3s VYUZycsgaX8rk8F2BH/MHkbB4VNvTbkLkaWGgPTAa1EpmCik89UjHaWM865rmEmHOPKu W3eLXR3Lnk+SNgnFNbbH6hJp1hlDWahEiLwyvckO7cJDdpUOvcWWUsGlh34m8w4RVAuu Vq6JwkNjyYtb93pTqEzhsp+Yzk8UhWBOEuF5s4YxVLo2x52dQkRHbuDAC33tuvNB9Icn 8AIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EYpWsTze; 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 s17-20020a632c11000000b0045ffa7279adsi17365780pgs.31.2022.10.19.02.43.53; Wed, 19 Oct 2022 02:44:16 -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=EYpWsTze; 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 S234023AbiJSJha (ORCPT + 99 others); Wed, 19 Oct 2022 05:37:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234055AbiJSJaa (ORCPT ); Wed, 19 Oct 2022 05:30:30 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21A68C97D4; Wed, 19 Oct 2022 02:13:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170843; x=1697706843; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4cl4AhnNeNw4BJarfN1NFenzpHPoBPllDdEre7J9jGg=; b=EYpWsTzeiMUPSWammoSAy3PZlY3z5Y6A6VFGOIdPFeYxJE+Y5j758mRL +wRiUE8m6Ul/XSB/OpM2XclGqTyB7s932vBomyBaO8GtqLqJTh9y3gyH4 uf5/jvNiamhWw85oeEj7BNx0raId+Cg/IA6hitU1iKzt3FpVNyiYlqRxf TPVqh4jasts/5WF/mT5Xis3uVOa/F7c8GGZIjxO8vt1CaqQtkUsAaXQJ0 CLP6qglwTjTgfl4m5WzCGKWTUW5Vf7g3sCk99+tsPWd2NG3limucxc0I4 zB7EsiNTv38sixuXYkO9GgtmHraLDmBvE7yxq+nisiFGONUBGbg9GAeMz A==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="332910885" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="332910885" 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:50 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734118606" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734118606" 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:47 -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 09/44] serial: ar933x: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:16 +0300 Message-Id: <20221019091151.6692-10-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?1747108659485821189?= X-GMAIL-MSGID: =?utf-8?q?1747108659485821189?= Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/ar933x_uart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/serial/ar933x_uart.c b/drivers/tty/serial/ar933x_uart.c index 925484a42c82..4c3d04c6826a 100644 --- a/drivers/tty/serial/ar933x_uart.c +++ b/drivers/tty/serial/ar933x_uart.c @@ -425,8 +425,7 @@ static void ar933x_uart_tx_chars(struct ar933x_uart_port *up) ar933x_uart_putc(up, xmit->buf[xmit->tail]); - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); - up->port.icount.tx++; + uart_xmit_advance(&up->port, 1); } while (--count > 0); if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) From patchwork Wed Oct 19 09:11:17 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: 4922 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp225834wrs; Wed, 19 Oct 2022 02:44:09 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4v8f4GYaOMit6tZBOnmMCCTVnbVQacnF4jK0Ylj5/wjP9WzoLZOtsThrqi2mlATZTgRmLZ X-Received: by 2002:a05:6a00:10cf:b0:563:34ce:412f with SMTP id d15-20020a056a0010cf00b0056334ce412fmr7841470pfu.67.1666172649275; Wed, 19 Oct 2022 02:44:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666172649; cv=none; d=google.com; s=arc-20160816; b=ARAu+6EzHO8neyVwXD6Ox0QTjfUoELKHNwyirtbonONGv/jGUeeN+jP8Ru+abkLa6I ME6pSk8p8hDB9jhkmK5xAgT2i0tJIqNs/uFhMGlM+rVmy0rz8QLG5g0Y0djg6dpQ84TK BoLAGH4YC3cHEAOlSg4lCe4RFkGweJCgmWQJEqw+WNB/xGesrpiU/jbsjnbnMlHQrV2o yoNg+1tPQ+0+Yjp/lLZmWpRirkGSYG8sk7REt6t8jvMG+MeN5AFqNtCad57L2ejzK7lU CFgXB9mY7f1WBGaoLcRp2er+FSFu8w75SktxSy5Wwxb9hREHhH2gyRK+iEPUs2aulujm X2ig== 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=PlP311o+KdC+cWLEJdF63qqsgVukJbxgm2m+fkNEaEg=; b=Lh+5d5djjUD/J/pfm6wcdG1ArVBlNzBGBvSIWTPUzzJv6yhv7P5n3V4lfnxWBLbhP8 eTt4ygI0JeltuV+A7RHk9iY7sYGeACdwzMZmKX9uZi0Yz6SmBiOzxm+4e3OMrW5tOFB+ ScypzSaEcNhVH7fsr3xBpoNpVN4rb/dmE3BHOSRKZvz/heK9NurwR01M5pXvtFf76bvW vfbBTJTAuIczYGteUF0DK0Bo7NwdAZ/m+eij/guH92obEF2RnZxng6BZTYFEwESonN3N EANgD5ZQh1KOk9ttIOnCi1yNJ3//51t83XCIcXSBqSEdvcaCnamhOLUbEwHaKrQOP4dx LPFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=PDqfAcYd; 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 c6-20020a170902d48600b0018486fabaf9si20730531plg.346.2022.10.19.02.43.52; Wed, 19 Oct 2022 02:44:09 -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=PDqfAcYd; 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 S234013AbiJSJhY (ORCPT + 99 others); Wed, 19 Oct 2022 05:37:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234051AbiJSJa2 (ORCPT ); Wed, 19 Oct 2022 05:30:28 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F05DBBC18; Wed, 19 Oct 2022 02:13:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170843; x=1697706843; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=xOgNWaYaiSGZT+djjVEy4FQy1WDnM3aevb7RyoGHh1o=; b=PDqfAcYdB7VbtKnvnY220k6sggkJmvXj9IksoWVdMjib3kzSdNVXZbmc hat5ie/QpS7bh+33Z6alBfTxpsJIubhH/YJdJ4bdmGDftz2nSRJm+9c2c 0w8Wq0/Gwct2d4nz4AwpBjbKElZ+pJ+qfHWrMY6Khe63b2RKpTPqGTLeg AyHKwIIUnIeimC/E2gcL7Q2ECY9Ni8QbJfQ13tyqs73Ue/Puigmo7omrW JtedsrMYGMwjZgXEKFT+UA7NHiuafSrV6Y4WwBB68gPd2YnAiLU3nfqit zkm96n1YkFZzM18SpWpEiZwMxg2/Gt3kLJws9+toeZ7ydcbm/Z/cdgEun Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="332910891" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="332910891" 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:53 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734118628" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734118628" 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:50 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , Vineet Gupta , linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= Subject: [PATCH 10/44] serial: arc: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:17 +0300 Message-Id: <20221019091151.6692-11-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?1747108651604536637?= X-GMAIL-MSGID: =?utf-8?q?1747108651604536637?= Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/arc_uart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/serial/arc_uart.c b/drivers/tty/serial/arc_uart.c index 2a65ea2660e1..748e8b1cf4f7 100644 --- a/drivers/tty/serial/arc_uart.c +++ b/drivers/tty/serial/arc_uart.c @@ -166,8 +166,7 @@ static void arc_serial_tx_chars(struct uart_port *port) sent = 1; } else if (!uart_circ_empty(xmit)) { ch = xmit->buf[xmit->tail]; - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); - port->icount.tx++; + uart_xmit_advance(port, 1); while (!(UART_GET_STATUS(port) & TXEMPTY)) cpu_relax(); UART_SET_DATA(port, ch); 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: 4980 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp227156wrs; Wed, 19 Oct 2022 02:47:58 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4OcAxD1YajXIBcwXB23x/MqT5V/q6PcWRD6M6v9Ajbgus0rQQ5ZPshTC6dgoGtGjpWPJVK X-Received: by 2002:a17:902:9690:b0:17a:4cf:edeb with SMTP id n16-20020a170902969000b0017a04cfedebmr7509156plp.129.1666172877791; 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=mo/Ja+5/0p1nyeLTEDXOSk6gBx8ViH96wGkDJwLTzOjem5J9MeCfAJBqg/XgW2ErJX e2uiot44wi4zwsSGX+VltYbappGrghK4Duk/qsUCk7vKA1sMc/6dtKMBXkV170B0xHno duVATOABcJ7BJftTqyyxegQP/gsVDcwMknFNlh6PJF2s0e0qW1Rju9GL2WCtOVwzj1a5 0MEykoUKcd++PjT5yLwr8lfSHamXl8qtKz2HXWDEqGq9InYc4LoqLjN6sRRZPNBZOyl3 mdnAPO73HyAQLtoQxMhlE1VP25rqxtDkKEtcg/GhsQy6BWcwRs0yIaJVokvrK4xalQnF HsGQ== 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=u2ZpuHhdZFOFuicBpiJ8o/0oo/tlmtmd9bTLy8P2dLA=; b=T3OY4yQIYWkaW+FapRCwwmfJu1Po5KUgeNUrV20PWrvVKgOK+ouP6kjlgMamr1/Kuv Ny54Lw2ZBkxAM5HHGYMaxii6WKaUUAED9CnJZfif8QMTuE0vnxmUc8Hx5D+o0FHC46V/ CCSPTuSv60FQpvvA1uP2TAZ8x37A2AIa33GENTxNCMfWqKGh7Cq6dpemVPmUeJ/UskFi 6oABm8zmnT3pZQYH3YzswXXNlug7KU+Cl9hgFJmoxD1ecoG2CZpnI35J9rTqKXFdPNTq s5BP0B1THe5uSasaeCelMaz5cw+jvMYgy7LU1pxjVKO11LJWBOeOUYuEQz6dJvpMHLxE ptyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ViwfHK4K; 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 g13-20020a63520d000000b004609faa2dbesi17397855pgb.285.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=ViwfHK4K; 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 S234055AbiJSJhw (ORCPT + 99 others); Wed, 19 Oct 2022 05:37:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233582AbiJSJbG (ORCPT ); Wed, 19 Oct 2022 05:31:06 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F4F8C6955; Wed, 19 Oct 2022 02:14:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170844; x=1697706844; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=SVyuluNhKfUl6XPBNwDdqJifQkuYh/oy8JzAs+w5pCs=; b=ViwfHK4Kb2V8QWDfNq5qssNPuvj6xBqQRW7C7ywNKqfIWXiFwV7aQSze iU6RbGQCrXIzAGJIDo3X4u/tmRF2Ewi5HF4O7LqNSycuLN2/h86vIKY80 cehmVBuoYpB/xKC4UfLKDzvFfGEBS4EsR6S+dnZkVs2w4XJNQuu2V3vUG DFE82aP90R78d474jeKtuPOJV22PJrcBCdeOVwfMzLkcsJCf+weCcRgMb jdU8V0RR6Arl+5/J0oP5ziYaVMf8eNkkwQx3kqIe6j6KRzvP97eTOzeLZ Swp5Oi8PyQn7RmGSEgpn+gMfFphq+aQOwIgvExYYxjwpm77MvgFShUvAZ w==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="332910913" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="332910913" 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: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-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?1747108891272723125?= X-GMAIL-MSGID: =?utf-8?q?1747108891272723125?= 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: 4948 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp226329wrs; Wed, 19 Oct 2022 02:45:34 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5nNJRIX/9av10FHyItpPpD1Ub65yoEJU4Jzwwv+vWpRmR0WQPQ4DQrw54lOSlsa5XVmLxf X-Received: by 2002:a17:907:7e9e:b0:78d:f3b0:fc78 with SMTP id qb30-20020a1709077e9e00b0078df3b0fc78mr6025769ejc.478.1666172734038; Wed, 19 Oct 2022 02:45:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666172734; cv=none; d=google.com; s=arc-20160816; b=uEiTNMK2GRg/AaWW0MbRglTOzNnhQoIBmEZqDX6p7HmRhDRHH/ZLavwNMsWEwigDKv j2AXa2FxInp7UPMWHaV5FWqoFSlo88q9Yr/UR66iWX5s6TrQBuEaHxch1CeDgJvcMknm z29qJfULPb/uAsVINkg7jM/Jz6qe+dtprt3fso3A48KonjeZY140NUtuBR8Tsdjc24C6 smAnDPEV9Apw9RJLnbKIkmvg1qhOIR204RvDyTMzVb7wQ3KvA06m0rZrK2LzaB1iVK6E Ob1Th++15IDnKl4um1D6vUU3gWQM2k2ENjeFLDQnN1ByivSb7yKUy/Tcd/Iaam0Y/C8y fnhg== 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=m61sK2AKVM1FATBCfKnrtSkBCoxvjh1q7H3nQe4lY3k=; b=sGjUm31i40rRW1gySVH0olBmY3H2GnwliuJaB5vT/QBmV4cxxpbf4RSMPWC1767hvy Oh1EB6LqM6cywtAVPD3OiGvqfXZwmh5axT0gOHy2qYoab/Uu5J4Gkcsby2dLwdOZ+rIl RXItWfvnHQQpCFXZtvrXG+MtgjCtgWM4Vu6pNXo1pDOKPZAcz8qicpMTgzycMh8Gi7KI xVL8S4V0NlAH2NnrX3zobq3z9TwO7QjF+UMTlsnppXCxLuUqEcMb8XJ4H2nuhJDfvs36 fcr+2OXt9UI7jMw22gQMM9TBliBER/oG8MRXrvkanue9vm7hiYChelGnqjX0HDNc9V9b tUGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RcfQwHG+; 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 b23-20020aa7cd17000000b00457c6a2a3f8si12886110edw.68.2022.10.19.02.45.04; Wed, 19 Oct 2022 02:45:34 -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=RcfQwHG+; 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 S231807AbiJSJhf (ORCPT + 99 others); Wed, 19 Oct 2022 05:37:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234075AbiJSJae (ORCPT ); Wed, 19 Oct 2022 05:30:34 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 177C690823; Wed, 19 Oct 2022 02:14:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170846; x=1697706846; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=eMX93eH2WJp+28L/XNZpc2+/7jkBXPYnsGkOfw2cMDA=; b=RcfQwHG+AW9RfDHWTs4dokGYsiSiedEmdqqgFcZA00nV8BJugz0/Yz9y 5NIYPyUIO0KrtTevOa4YnKyimK8LUcB8fy6WsESI1AgR5q+ysvScA8tQY G6p6J6y9xLeQW//4JqnhNFvIuQ85gdBzVvCs3yKs/1udmbRfooYiZuWzF UrrHuz0XY2WetvaQSx6bBPLbhX5tWdhtmoC5o3koA3z+8R8gtw1IGmWrY GyiRrEfG+akoAf7b/YEIhjFetpCWr4kWPgPiV7yh4/mi6ra/JwZOtr8/R qJo3YHpM+OdLdeZci3YIjmMwky8HKo0rTXYcekvwHuAvzMRH4YFp56YZd Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="332910923" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="332910923" 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: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-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?1747108741174789698?= X-GMAIL-MSGID: =?utf-8?q?1747108741174789698?= 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:20 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: 4978 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp227141wrs; Wed, 19 Oct 2022 02:47:55 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4kv+jXaciHWcY/1q5/Bd2uk56MGJGUuJZpSnTL+5caOlh8qPd3f78B/h37P+UQjX11LHXT X-Received: by 2002:a63:6c01:0:b0:429:ea6e:486d with SMTP id h1-20020a636c01000000b00429ea6e486dmr6326543pgc.247.1666172875491; Wed, 19 Oct 2022 02:47:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666172875; cv=none; d=google.com; s=arc-20160816; b=xfh8ajopZThM+3SSfW5ZXCYcr2XcsPJChfD1cSHqFQnWkafYJVD+bFYTpNKf5y1o1u EbVZK4Owak5fHx7TcOKVlUVex571Kb9LYgD+0GhPlx1oAOsSM5PcrPzZFXm9HghDB5er H4bZTBNdnoH8R8++GycqJ6J311jpWFwiNwjRDpFfEB/jgS8gBbCdaVYpHwoBvTadsVKE 3csOEh+R92lqumpxhg6Z58G2nDIeFsCBEeVndKCWCS1kcv3TzZ7KqcMMCopfnduktDkI sryi+VgGRy4lFDpXsTGavrbta/k1w4YhC5f3FFVbRk8AskU/hOxojGDxyoUPzbuIuOb6 WCeA== 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=QRhf+dZ9I4CM32ccgO2YkAhEuWWIYHFZUa5aleKeUR0=; b=fdMiEo64Z6jBnJSjg0hxXy5Wl//4Lzy/EGWOp0/ZiBL2kGLMlJqewPYOdRoK1XWprl J96Izt0SQJFdDrGNpUL8j7BMxRMwWHhehRHxAr1w1Z52PPS0dtr98v6D0Gu8wqyv9B9t ZGebvgaLOkdmpVKa5v+H39QwM6A/kLdSE1t2BhUI3P49T8oK70azycgbMdOxiVqO4cOu H8lER9o8Pcn1/OqYOq848RTNEOF7BYxjTqHdOvswyPooGPdXIwBOzlnJZtF9VjU5YfBA QpTPHWOQM6IXBRv7nwAQT4eLDSgCfxT8tHr+yjhUBpmin+nd0z5XDyzYoKgFVjxjM2HX PBKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nTExoDSW; 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 b3-20020a170903228300b001732b4e99c4si21090217plh.377.2022.10.19.02.47.40; Wed, 19 Oct 2022 02:47:55 -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=nTExoDSW; 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 S234040AbiJSJhm (ORCPT + 99 others); Wed, 19 Oct 2022 05:37:42 -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_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 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 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?1747108888917433499?= X-GMAIL-MSGID: =?utf-8?q?1747108888917433499?= 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; 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: 4977 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp227138wrs; Wed, 19 Oct 2022 02:47:55 -0700 (PDT) X-Google-Smtp-Source: AMsMyM684ISeqYSPLJAesz1JTixockoPvcw5LxyN2pmgLfC01rDYOWInD32C2YPKJ+IStIiIiK4K X-Received: by 2002:a17:902:f7cf:b0:17f:9081:a3f7 with SMTP id h15-20020a170902f7cf00b0017f9081a3f7mr7436194plw.3.1666172875446; Wed, 19 Oct 2022 02:47:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666172875; cv=none; d=google.com; s=arc-20160816; b=ZzCRCJf67mKiTpiz8j1mWO8YFRUbVegXT5jtqjaKPjKBwguXY2u1ym3PqW+fPANHAs U3kW1an1txLmfdKgc/wdxiNYAqLykG7GqwJiAx2li9TSI2IyNNscREjqphLsoVqOzB1H vgBJ3gsW7Z1O8yfuPRywg53QI/lmw4xYfUMa36zU3RisqFXTANfjaiF5FIy8oyCTrpJ8 Ff7d5A7MIXt5UMgKbEu3dVsupfURbobM2Ax9zGUKnpjUoT01Bt0Y/7mZdXuaFuAjwuk+ 6GKxBcjIccgR3NUydUFKNlhMeQbQS40i39CrtlSEUo/EBB7+l10KYoa9+kPcg0dtZh2H pjnA== 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=bfW+IAG9wf5GMNfIUZe5eOX/TyI25FSYxc8R/m2k/bI=; b=lfjJ/FWbn8jufD70Qc6WIZdNHfQZa2C7Ibczvd9iTMbC3SLH1926NfmonesAENOPzr Be5u4LLhi5VUcuOX8fpJAc8fGNpWOEXf40tP3p3cFv+0BbZaEgVn2oPqSYvxzFZ9PB8B os5OkXSaQtkiaRXeT64xVP3OOG3YrrRNiDqg2aMoQORvTES1L1rkIQyrekYXSziN3nAi z8UqOzEKPFv4pWDCpZr742rQovf7HOSn77vtb2/XFXueKwEmQss8iXH+90ri/jdqPAQv fF/kFVHy0NlHb9qWhEAfVoY6OgpQ5Kxc8fbFAiwV2obvdfQBFFMGo6p1tGfc7nnL753l 6oLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VP6f8OWu; 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 c14-20020a63724e000000b00439ae52c996si17144053pgn.71.2022.10.19.02.47.41; Wed, 19 Oct 2022 02:47:55 -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=VP6f8OWu; 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 S233870AbiJSJhr (ORCPT + 99 others); Wed, 19 Oct 2022 05:37:47 -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 S234126AbiJSJaq (ORCPT ); Wed, 19 Oct 2022 05:30:46 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 409EDC90FE; Wed, 19 Oct 2022 02:14:17 -0700 (PDT) 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=6iBAyZ2TmBGOpfnjEhIUNYz8G3ZZgfaE+WLV4oh63c4=; b=VP6f8OWuF8WgI2U3k3JguXFu9abwb48IKlYTdQJJOPCRlzzw6kyZWYEL wEDGpPPbK+2MTTZoBYvSEVYCC/UCWGurAdA5y8TZ2KdoKcydyqEgKhaUi P00NPWUBSuq1jltE73ih+TGGUZOAeGZB7DRKdNbn9TXQz+7d/LAY1NQMw rr5ucOMP4sLinugh7z7x6d2D2CzCFNfHkJ9D62rvxf5mqEMFuNkzwJF8H /mE5Iel23tAdeyPWVh7cfYy37Bs4SWAs/RG+vKCTpC8EHsDOf3QZeXHBm FOF5WbNvUG0zjHiuVH+My+WV9DUJdgYZlf8/n9Ahl3WQ2DPr+dIKaeYhk Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="332910939" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="332910939" 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: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-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?1747108889245927294?= X-GMAIL-MSGID: =?utf-8?q?1747108889245927294?= 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:22 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: 4976 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp227136wrs; Wed, 19 Oct 2022 02:47:55 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7XpL9ZWyvrjAOCIAK8h23LMkXCJtczMBfVphf0i+RH2399Heamw1Ge/7TLTYY2uKj60HHi X-Received: by 2002:a17:902:e191:b0:181:b25e:9c17 with SMTP id y17-20020a170902e19100b00181b25e9c17mr7671812pla.57.1666172875356; Wed, 19 Oct 2022 02:47:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666172875; cv=none; d=google.com; s=arc-20160816; b=RumoLbOWmzkFf59ohDJelzqzfmCwMaW1KqmoJD/k3fNTBtlUlhK7lcakDZCSPuoAIt 947KFOLs36e2DJbL+rub9GxdJfiU6vqPuUPeUPV17r+t4aTjRIAZ2gX2myzm+lgOtyqH l7fIWCicTtvRCwVVkUS2sz38NJmEU9BbmEcZ6arwFiKw5dn8p3sn54YF6ZgqfTzeeYaQ cr68xj+/OLhZTMr6qiT/I+h+BjGCHsdsdjSrtBbx6Zm1S6JAuEJcF0eEQJ5nw0YijIFW ndzSacEoMlOlt8RtXoUqwGtyn8cirjI7CLv744FbtSa7D1KDsNFPfjR2lnUcPCAxYEYp Nusg== 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=4m1eP19Xlmh1qUnf3bS+sWbaIJsnTDEdipr4KfAuvok=; b=vCse/tOidwF1JZm1AppKiLJ/3jiCaml609+/K2Qhzd6IBhnqv4yS8dsjSPO/b306Qc 1ARuKLgMborwhtIXWv9ZeI0y4Sl9pbvUSvWpLleQQTwT2AovQNmf1RTR5rdHNqYsMkFA 6m0hpBxRuZXEHpch/gNPLWbeu5yiN/+OPlvn7yjOkSKdb5SwsjzxB0YgtFQjPqNkcva3 H88NbJGTP6cCh4hBIZn0BegT6HSzdYDPuqHTuuWhwVjH8YwKGUK7JHcdcrCETXKuUabb wdatnQm0gsYG/4Gl/PHAZ0IpUBofKxqiIttwovA4P5GoQaFAhXI+cn3UcTuRVtvSwhA1 SL+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="EzgS+/qZ"; 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 k10-20020a170902c40a00b00174903c4bf9si21235355plk.72.2022.10.19.02.47.40; Wed, 19 Oct 2022 02:47:55 -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="EzgS+/qZ"; 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 S231601AbiJSJiU (ORCPT + 99 others); Wed, 19 Oct 2022 05:38:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231715AbiJSJcM (ORCPT ); Wed, 19 Oct 2022 05:32:12 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A81FA2675; Wed, 19 Oct 2022 02:14:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170863; x=1697706863; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=vLDHMA32ywtkYZgvk228BKSnKFFrTIViAEXtm5kls74=; b=EzgS+/qZfY5VRQNwKtJfmvYmzVaOyMSkGpEthEP9cZFsYjB43mzsvI/E +XzaQ1+iYxwGmdxGAFF90Ierem/FYBDfpVMITajsjlf4+DRIqRXuBZd7a +8fLK23osM6MBklod1tTZA9vDVW/LwZprmAXPDfMQf9eXKNDS6rstEG6O LYkSZte2AuT0kNS+1qHEk7Cy0wfi5h0FRfMiT1ZvmpcXa4uc9CQ/WY5kt Dn3zB3BG81h/7I1tyYptFCNAzNcvseC2sB0rF2fx+6XZF3/C//Uabxssv xiixRakoUvqypLitjX/KfPYs4Sbxy/Ki6CuNGzEow5qbQSoK0B5ktbJ2j w==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="332910947" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="332910947" 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:10 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734118762" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734118762" 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:07 -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 15/44] serial: linflexuart: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:22 +0300 Message-Id: <20221019091151.6692-16-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?1747108889063632364?= X-GMAIL-MSGID: =?utf-8?q?1747108889063632364?= Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/fsl_linflexuart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/serial/fsl_linflexuart.c b/drivers/tty/serial/fsl_linflexuart.c index 84e8153e5420..6fc21b6684e6 100644 --- a/drivers/tty/serial/fsl_linflexuart.c +++ b/drivers/tty/serial/fsl_linflexuart.c @@ -178,8 +178,7 @@ static inline void linflex_transmit_buffer(struct uart_port *sport) while (!uart_circ_empty(xmit)) { linflex_put_char(sport, xmit->buf[xmit->tail]); - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); - sport->icount.tx++; + uart_xmit_advance(sport, 1); } if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) From patchwork Wed Oct 19 09:11:23 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: 4971 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp226970wrs; Wed, 19 Oct 2022 02:47:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6FK8xAYEYKuX792ybXkZT7NF6TOKix7g8Z49Y62MlmVzsGuBd32MhPYefwTZ6vKbB9VowW X-Received: by 2002:a65:6148:0:b0:458:88cd:f46 with SMTP id o8-20020a656148000000b0045888cd0f46mr6410808pgv.303.1666172848356; Wed, 19 Oct 2022 02:47:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666172848; cv=none; d=google.com; s=arc-20160816; b=UklkR/abUMFQDXUXjCsHpaxsZU4M/NLtAldwvM+BT6LQD9zVCroVS+eDJstM5aYD0v DzrDOpvwo6O6C6dT5BxRBciPx7E3KL/0ggOSCocXjNhaO+Ti3Pob0X4YD5JrfaXaqh6+ bWGxV9xa0+goDzJ50widIieURlcxyc3LC0aqGpdNGaKEYcuwtVCMOVFYRXb6E8EmpVJN QehImUykh+DgnyjtsvUm9bkwVNiPIiMQmQg5WXj1O7R9003zyRFxTEsOPvttl+FU3brq CxQ+8WkSO4yCsDxY+fb5GEsOgj6kAjoykAjwVCJiM0bOaOF0gAdcFctIpO8GO0IL4kgO IFow== 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=myOg0sHFlZSV36tqAZ4559T98rjt8yZsmInObyAYMeE=; b=q9aVKglNK9fJCYwllNLgmdu6hggW0T+YrbJaPc03qtwuLaax2OLSnxE72tG20JgC27 JCMymUCgGKLJWIdBITLLIUwbA90rbjwd2MRuVyqEXijT2O63YBeYhLgemPabtWuLPDxU VQIC02MJgduHTrS1DRdE7pPkY07pvnSAnBuqGqMVVc3yVS8oQYfnXo9yWDht4qEfcOnX CeJUEq2jcGhxc0rRiAT2g5wq4+rfflge1+2WiIAoTeOvToVVtQz2ayRjsDjCznctTb4G XUXSKC7RbuBnby/HwFD0pb73bNts2UZ6i1vfbR0bLAl6U0pQgr4Eh9Owh0nBpA3IuRKQ LaFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=UlSQzY64; 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 q13-20020a63f94d000000b0046265702353si17920041pgk.203.2022.10.19.02.47.14; Wed, 19 Oct 2022 02:47:28 -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=UlSQzY64; 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 S234077AbiJSJiJ (ORCPT + 99 others); Wed, 19 Oct 2022 05:38:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233748AbiJSJb4 (ORCPT ); Wed, 19 Oct 2022 05:31:56 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 814323BC5E; Wed, 19 Oct 2022 02:14:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170871; x=1697706871; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4ObBwRuWrJK1g3IrqjFMLSUzxYAzEx+HCgNSGf3jLYM=; b=UlSQzY64Pp0+6M14RIovJM6PSDpMrmWXA4U84Kz6MPUHRVwIZ4IG5Zts AKD+yZpfoqEY9oqfOl8mXEbhXMwne++JOAWgNcknNeAtgjKysjSjQyh5/ Nfg5aZr8NNEL40GkmMxIMn15n1PW60PqaNm4rNr9IgBiNAK5z5phC5RY+ 670Ud0PnkOPJbuGYb00CvqYaj3cqcCeZXqXe8j+0z89ESvE7TD6XFn2Aw e7ZvdvpP5R/WcjeFsqg2pPVcbmzGAkn1CAIR9wRfmDEmVPTaj/0D+Lmin hgnkst4fNYZLIotX2EwgkvLxm5UDGvmg95G4vpqMDJY3bFwojA4kuQ2oW w==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="332910963" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="332910963" 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:13 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734118786" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734118786" 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:10 -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 16/44] serial: fsl_lpuart: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:23 +0300 Message-Id: <20221019091151.6692-17-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?1747108860513852728?= X-GMAIL-MSGID: =?utf-8?q?1747108860513852728?= Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/fsl_lpuart.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index 67fa113f77d4..1c9c9f5e3610 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -535,9 +535,7 @@ static void lpuart_dma_tx_complete(void *arg) dma_unmap_sg(chan->device->dev, sgl, sport->dma_tx_nents, DMA_TO_DEVICE); - xmit->tail = (xmit->tail + sport->dma_tx_bytes) & (UART_XMIT_SIZE - 1); - - sport->port.icount.tx += sport->dma_tx_bytes; + uart_xmit_advance(&sport->port, sport->dma_tx_bytes); sport->dma_tx_in_progress = false; spin_unlock_irqrestore(&sport->port.lock, flags); @@ -792,8 +790,7 @@ static inline void lpuart32_transmit_buffer(struct lpuart_port *sport) txcnt &= UARTWATER_COUNT_MASK; while (!uart_circ_empty(xmit) && (txcnt < sport->txfifo_size)) { lpuart32_write(&sport->port, xmit->buf[xmit->tail], UARTDATA); - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); - sport->port.icount.tx++; + uart_xmit_advance(&sport->port, 1); txcnt = lpuart32_read(&sport->port, UARTWATER); txcnt = txcnt >> UARTWATER_TXCNT_OFF; txcnt &= UARTWATER_COUNT_MASK; 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: 4985 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp227158wrs; Wed, 19 Oct 2022 02:47:58 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6enxdrBBgHqpK5iwaXlpGjw1TNaf/oZG3xXdYwpmO6EkMqA+Xjm7zL9wI9YQ0EwqcI3Q5t X-Received: by 2002:a17:90b:3908:b0:20d:4151:1b73 with SMTP id ob8-20020a17090b390800b0020d41511b73mr8885188pjb.45.1666172877794; 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=azJc+8yM/kUJiyISzOi63kiuuI0W4o9cE5WFOILUO+W4n3jEADO4TMsDHP2Xw3sVOW wU/i5RjZ7m+1AAmObaa9Z8b18DaLggzBepYNKatPAxqz5pHkh30VrpiNVHaK1Rq1oWA4 4sQ+KhAf+1vPYPPx78PP3A0S2qzQ5mOAWfgvtKPsoGGG4dJfsAJOe7QUoPRmhavJeLGr HWDH2p4XSOpAbEOAQVusszB1GzE7X7KvRQR7WfpjPMnL5kTk1ugZBkTo/8QHSWUxiBfB 3B7HOYvUox7mqW9lRQY92A0BreG6sy/8Ah+G8tPa1Mf0Cgalti5QonzFOPPTsnwsMJqd ZK4g== 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=IDRTNB7ZoucdvisNpB6ceWf52Lz7+zpGAuv10DyIR7k=; b=LpMo715QgZgFRuilAht2T+8v4AcSttDVx4H3EBRQYWB/qyMAVLxTvKAL7eQzmO2U4S Yvx5T7iHuSU4acGtsD1GqNkuNypN2Jup+DQfvHnZEi67DbIKM6jmLpYC6h2Xqhsd22XL YZwLHOc1BEUfOHA8ITrvZVrBDd6uFQQXn2uBe8mOu9zoGtX1KI6ImOjPQpTqDLUjlWSG URl25wgp4vTl9RT5le7Gqdc7f8B9RtkoAHSz/Jy0uhZxRUbuV5Hc01uRkpHSyn8iiYhx 7pw35oySKScNl7EsAl2YqBzpKo+JJnWNJZrRS+EwLDz5ltVrKNtQDzJxa834+qkX1cUT ykbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=C1T4Uh84; 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 h13-20020a170902f54d00b00179f3da346bsi20222862plf.39.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=C1T4Uh84; 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 S231136AbiJSJiB (ORCPT + 99 others); Wed, 19 Oct 2022 05:38:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233593AbiJSJbK (ORCPT ); Wed, 19 Oct 2022 05:31:10 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5416133A0D; Wed, 19 Oct 2022 02:14:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170874; x=1697706874; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=LfL2WHC8lVbuBm2BucTh8bRu07F0VUCsL+ehIqnzvLQ=; b=C1T4Uh848/LNXZCBVMsJ68TyzjgPsMnXDyQjI0quNQj27Ovgl2BmWclx g/sbaiC95w+fGCJ5KGrUFZgFslvQE2vZD5aacuKe77GuyzGi+LTCpm0ew 9kScLtqg4zN0RhuD6C8Ey9aDS204swe3pH7SvJbxeFZqtZY+1ExTzpiYu 1uyYKV8nsnYZ2X+Kg/mdO//jSCCn9XX+Y4LIX0Gfxxlmxz8Qlhb6ZF3F5 WgUA6+fjlZRLPIkugFjxkEmKsmwqbrr6kPjF7D8xP0l91eIIWI79b+Qgw xUZOh2zg13KlxbYVLiAwQY+Po641iqr/modAc2D5NSI/z/Xo/MYWXOcBh g==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="332910983" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="332910983" 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: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-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?1747108891171672436?= X-GMAIL-MSGID: =?utf-8?q?1747108891171672436?= 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:25 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: 4981 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp227160wrs; Wed, 19 Oct 2022 02:47:58 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5cA/XRy31pbGPZ1aRPuSllYV0THHFYF401fO1mXX+VwT0XBNlrh9AadxdZj6NxrZyOButa X-Received: by 2002:a63:7304:0:b0:46a:faa5:700f with SMTP id o4-20020a637304000000b0046afaa5700fmr6660041pgc.253.1666172877792; 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=CM4J7bTAIW2kUE3IyaFymu+wAWsf4yyX/n+BmNPyE0bTh90ldDj4e4gjE+bfYxGmeF xVYPxAoR9yaQbYSL12R1AtGH+lgk93Zth6PzlRA/AYT+oOInY/AVzxDqLzyX3ahMtn37 fdYq2knhGvdtd3/W4hm0ZwWXEScc9Ku4rTJqWFAB4DUeeJfCxjiFhKD4R6u54brjzD+J x3/vCSoXt5dMw8uWf2M6ikT/KSjzPdcM9BgL/+YjgeJwTTC7zW244bDQ2+xxj6gSdd1v xaEsBja/ld2gqTYyawHrdIuy+S+yTAxsZ0DaMrdObcgJSaEG95MTcJjio6K9rAxWHtGM 8rWw== 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=HvwpdsrGD4gXQ3gaEVYwha1kGaJ7UIX4ndlO5u9L3TM=; b=rlSZZCLRAbv5LAqKrLXCE76o6AUhnXyY+6WE0s5WZ1eqiEitRa1CTb1nDOuof7botO XI2H6S7W1/WjnaLCwPhmXB49MhJsRp8lgfMwWqUXZ26V/LB3nfnXuRQr6h1rUu8qKT/T xr90C2gDjQixK49WOMIHShaOxGA0w8QkMz4ysGv6077byxqbLVpioA0Gkrzs2F2EEb8D SM0v5iWGowcxiNFvMXD1tZcYgJ3rZxCpTPWkyRUfCr7xEwZ+BkFv4RbagC6vXIqQBnjI ZZc47ZMROEQctLHl3V5mwO5t2+3pTt7LYq/Xf4uNm5Y++5jYFYctkLvk00n4wBrwpIyf fegQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=gmnO7QBJ; 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 e11-20020a170902b78b00b00176ab430a57si16391578pls.546.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=gmnO7QBJ; 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 S234099AbiJSJi2 (ORCPT + 99 others); Wed, 19 Oct 2022 05:38:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233790AbiJSJc1 (ORCPT ); Wed, 19 Oct 2022 05:32:27 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5408A326C2; Wed, 19 Oct 2022 02:14:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170874; x=1697706874; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=i6im4WR1jwm2SaUMp4yqSHc+iYJF+/hkOu+zBY1CN4E=; b=gmnO7QBJTkZg/Xh9xeUXtlAfTWSBMyvWyKJUSaHjq/LIwJfvEXfdYZzH idNhD4gLJWn7u41WFkvzriNR8S2GVoWo/4tT4kyOmFQvGqV8YiaClBXi0 decuznTpp5pmhwbvB26FH/mlHcYjXBZnwfJGDfmaYJvWEbWdSQMvY7Ssi 5l+ko2fWcxN7ehUHqyJ5i/HQn0KnnaCNkcfdVkpr2boj1ZIHBh7AxMVl4 j/0Vk9qAvwk0gHn03P1ZbxWo2y1z/pYGK9AY5WR1fOShXzOON67vZl1xw HyV1Akpst7RIy4JTIs8gY3urHcfRw1GVM8G/iL0SqLpkbPgSTI0bPW/8G A==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="332910997" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="332910997" 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:20 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734118812" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734118812" 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:18 -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 18/44] serial: ip22zilog: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:25 +0300 Message-Id: <20221019091151.6692-19-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?1747108891444427408?= X-GMAIL-MSGID: =?utf-8?q?1747108891444427408?= Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/ip22zilog.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/ip22zilog.c b/drivers/tty/serial/ip22zilog.c index dd0a8915ce4f..b1f27e168135 100644 --- a/drivers/tty/serial/ip22zilog.c +++ b/drivers/tty/serial/ip22zilog.c @@ -409,8 +409,7 @@ static void ip22zilog_transmit_chars(struct uart_ip22zilog_port *up, ZSDELAY(); ZS_WSYNC(channel); - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); - up->port.icount.tx++; + uart_xmit_advance(&up->port, 1); if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) uart_write_wakeup(&up->port); @@ -609,8 +608,7 @@ static void ip22zilog_start_tx(struct uart_port *port) ZSDELAY(); ZS_WSYNC(channel); - 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) uart_write_wakeup(&up->port); From patchwork Wed Oct 19 09:11:26 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: 4983 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp227157wrs; Wed, 19 Oct 2022 02:47:58 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6snDwJZj7L7p46ACxabrVCjnFtKaaKmwj1l522DZ5Qh8mJ9BzAGwyVsbmKxEMG0xxsq8pW X-Received: by 2002:a17:903:258e:b0:17b:a251:c80a with SMTP id jb14-20020a170903258e00b0017ba251c80amr7651237plb.110.1666172877784; 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=zuJ0teR92K5S1DtvAGYrVXcidgMAdfWVcy+wZmfQdDdaKToe1dmSVgtVP+dPG1rzPz mvJe0YaIZ6K583kYRE6yMMHfwBfTjF0m3/HhTeXGoZU/1YeU4uYinf5IRdlpbVES2v+y ZomcDKxWeUFZFtVJc2ISW3rve5SxBbUsOSSralLmourJpWHJ7O2gUuubTAYmHhLlpMTr 0DrVjHBxQAS3JWtncp93O1Fcnq6ls9HTmpg3BI3dZWkNpRHk68o6niSLbF7II3C1T0j8 EgUlpT38PLHrKEaozwVd8IY57kXj9reFrnW3/J6X08PZywwuF2Q2zzNoDkqXfkXLIrn3 rMpg== 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=KyJUcM8KYx2KzA/FHI+qgt9F2X3w3v3hDI6NZMqUmaY=; b=0BYarbQfQ++oMiXHjQj1RUBx4+EH3nTqk/O2b9rjnPLQ/IxNJBAhkS/Txx5hH9/L1z He0KeHc2HUFanKutgikNl9mmUXFTnB7wDjAVri9ej42ntsUNJvTl6zIq49JBZdfLJoSk 8w8U4YOynkUi/Xi1QWS6WyKzxecsUtBEa6urI/h92e2fXEq1oelknLF037OuQ8ooH8g0 SFHWDWd9l/3HJa7J2CAI/wB6jeWUdajpDXgod8S8mhp9TUSdWh/YyIJcqj/RlRd/EicS VykWao3JQOkocmYFnnHPYxyB621m2aWQliHIDX6KNjeLqNIRp6TcTfCI3gQKqzjp4pEt 0VGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=cdriaEoS; 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 n9-20020a170902f60900b0017f73e4af01si1606380plg.298.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=cdriaEoS; 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 S233947AbiJSJiF (ORCPT + 99 others); Wed, 19 Oct 2022 05:38:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233682AbiJSJbs (ORCPT ); Wed, 19 Oct 2022 05:31:48 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 758EDE098; Wed, 19 Oct 2022 02:14:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170880; x=1697706880; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=boa0UFxdlZFq3YZjregu92/OfkuX7qn3ZD0BhYS89oI=; b=cdriaEoSvH3E4d8z6orgBeB5s9woJHnGoabGOxoWjv/+90WkZOVIHmd7 dRIEN09PLcVUvNN7vT4SPWiJ9SIL8oCEGEwkmlwxrNxYMZesvbwd+vUK9 KWfgltg0ulWCubQwcyoriSyY9EhHKGgbIkQ/cOkiMkiYc8peJrUe2kVLm aOUwgwqJFExvnmEt/OV4gX7zqXHVHcqiSwmwuGhocZ/+QQVeeZb3rJ7au o2l3dtBAuss+nw0WDtKU5lhP5yPzmdrCgxJt3ykbJIGxJOXVtfFTpM0zz +iS+rta/BRkeZipcdFedAPVRyfAXAqaPVS9Q6vOfVLu4pFynRSsm8xtft g==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="332911005" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="332911005" 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:25 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734118830" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734118830" 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:20 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , Karol Gugala , Mateusz Holenko , Gabriel Somlo , Joel Stanley , linux-kernel@vger.kernel.org Cc: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= Subject: [PATCH 19/44] serial: liteuart: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:26 +0300 Message-Id: <20221019091151.6692-20-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?1747108891126430823?= X-GMAIL-MSGID: =?utf-8?q?1747108891126430823?= Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Acked-by: Gabriel Somlo --- drivers/tty/serial/liteuart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/serial/liteuart.c b/drivers/tty/serial/liteuart.c index 4c0604325ee9..062812fe1b09 100644 --- a/drivers/tty/serial/liteuart.c +++ b/drivers/tty/serial/liteuart.c @@ -136,8 +136,7 @@ static void liteuart_start_tx(struct uart_port *port) } else if (!uart_circ_empty(xmit)) { while (xmit->head != xmit->tail) { ch = xmit->buf[xmit->tail]; - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); - port->icount.tx++; + uart_xmit_advance(port, 1); liteuart_putchar(port, ch); } } From patchwork Wed Oct 19 09:11:27 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: 4972 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp226969wrs; Wed, 19 Oct 2022 02:47:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4YrPpD7z5ueAzyMAuQjO5UncSS8yvTLL2tLBO9R/WBGZG7oPNTCA83n7eVAa6wjSyIStuQ X-Received: by 2002:a17:903:2442:b0:17f:8069:533a with SMTP id l2-20020a170903244200b0017f8069533amr7450589pls.46.1666172848354; Wed, 19 Oct 2022 02:47:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666172848; cv=none; d=google.com; s=arc-20160816; b=Eh9tPWPOo5nhV4KssBYFDCvJzYxIFFBQG/v6lhUQAmn6kuwSxMa4ZmD7DMC4bUtB+L uD5TDbFhtxu/DX8Jit5dx/E4lwvrSeGrJlFFvkCxFFJ5RYwOBgexQkQAS/XgenwMhW+d SoVOAKdJZpnWbktybO80XYR8ABDyESA2IkbSAPIoGyJKA74WbGAnLsHNEleZkkQjC1Aa +ZS7evfZwNyvNhFYGPlNkGgc1du2Dk1klyKx6jhgROIcOpM4mj4JoI80YYYe9WwEQ7BM /nyc/hAaZY/YRWXQ0Lnp3FXfzgAlyq4g7LAcJdwuoszSamxtwFTF74rmGetrOT/5Yxdf MijA== 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=0T9ATFIOsVQIWaqLsyG3SJPLB4bJUsReRiPIwYN74bY=; b=Du5C58t9HiWRNjqDoYlqNTN/6wNHWkyfQ+CHCUFq3UGOMvVRgyaO5e7i2XkW+CtwBd bfdS/DY5jdiRXKz2ZrfmDErW8xjOU77YvvM3sIz4MZKEqKjx/QDuEBHKYJJgimBp/Ms2 /2Uu0m9FCxR068Zjvg5LGiW63oSAo4XzJrSwAOpHBUALpX2baxvlWJ7TCvUGVEyVXQ9h gzc0Q00LUKCg3h6NQECgG9nnedPtAUBXF5WwKdefn/+2toCyknicXXQEM3PcQhwNoSAN 10QczA0/3yDtSmV9LhPVNTXkW8UW3XDgai48pECbMBBw7ovLREGZ8wGfZNjFNfgSTbUq Z7hQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=bjwbNUsC; 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 o37-20020a634e65000000b0043bd8452080si17294085pgl.313.2022.10.19.02.47.13; Wed, 19 Oct 2022 02:47:28 -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=bjwbNUsC; 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 S233931AbiJSJiN (ORCPT + 99 others); Wed, 19 Oct 2022 05:38:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233713AbiJSJcB (ORCPT ); Wed, 19 Oct 2022 05:32:01 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A93A5259; Wed, 19 Oct 2022 02:14:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170882; x=1697706882; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=A3W1Z/a/wfh0NlVQBaAxeGrChj8cXJSxLfJmuWqzBDU=; b=bjwbNUsCrxF50uzZmmq6NQeKeaJy1S8Xwc+rOGZ/+QP5EQSL2PX2aYdO asVEd974TXPfbQ5wSzQS3uXPwQnrHD/sanpUGF5wxn2NAwK7dytjQ95YX VFMBHE13tlQVOKcHOt9K/IquPJEff0G+cN53QsdhhYsTBG83BvbQltovf vRIGgFFR1F8QjXTqMPsMAyAjwoM6VSD0X3LuESK+uyC+xPUPfJIiuo8Ve QFa6+qOA2D7YrRdUEgJwCr8m+65vHEfBzkexiN0vhhgBB7Kk4PuhloIp3 V8rOBVqPoijQPnBmgFuy3SwO3W2Gjqtsj4tAUocf8/xrYYQhL4RkKCXbl g==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="332911025" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="332911025" 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:27 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734118847" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734118847" 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:24 -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 20/44] serial: max3100: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:27 +0300 Message-Id: <20221019091151.6692-21-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?1747108860780386006?= X-GMAIL-MSGID: =?utf-8?q?1747108860780386006?= Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/max3100.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/tty/serial/max3100.c b/drivers/tty/serial/max3100.c index c69602f356fd..bb74f23251fe 100644 --- a/drivers/tty/serial/max3100.c +++ b/drivers/tty/serial/max3100.c @@ -292,9 +292,7 @@ static void max3100_work(struct work_struct *w) } else if (!uart_circ_empty(xmit) && !uart_tx_stopped(&s->port)) { tx = xmit->buf[xmit->tail]; - xmit->tail = (xmit->tail + 1) & - (UART_XMIT_SIZE - 1); - s->port.icount.tx++; + uart_xmit_advance(&s->port, 1); } if (tx != 0xffff) { max3100_calc_parity(s, &tx); 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) 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: 4935 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp226232wrs; Wed, 19 Oct 2022 02:45:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4WD4h4GIpelrzUbGUbyekVRMgzXYWVfpAm9yAxn5eLoZB3xcTnd2oPF7727MI7VpR/KIq1 X-Received: by 2002:a17:90a:c388:b0:20a:db9d:8337 with SMTP id h8-20020a17090ac38800b0020adb9d8337mr8571982pjt.61.1666172720503; Wed, 19 Oct 2022 02:45:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666172720; cv=none; d=google.com; s=arc-20160816; b=qKd3ASSIZXh7hD4jhTx5fUr8m8FBrc9QGO1mEoEr6jG7zIj8oWJHrirN4SuPcQqZZg B97m8+XwEiD9ZbTxSFTnpCDMerwYuBYY0i0Iz+yLkXRGfHXI3onUukZOLmfwAjvBYW/P p2v+34GUWUUQeUeGvvc2m8ASYZZQ/I1wNO177iommVd9LvFC3r55olsvv8/WNcF0qEzH yOU8IeMjx2v8QyqlS1hdCbrnCQll0MC/aaFSsta1Bw3hLfcd8xIOqJzRx/Uyuoc6GXC6 G70qliJthu4kzOJGj9RpsRRu3G7EQH5A5L8Gt4UM9yhYJBGZmAnJ+w4D/AiSONXLNQ9+ 8UFA== 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=dbDXz+xL7v0tWH/lezpTCK3BGxvdxzhL5jq5APlRY7Y=; b=nYP/F+LOJIDjt0YzCMkcnhSVw2yQ6pOZt84WKE1gLhefusAUFWSZT6jX6o/fLak3DS xmfTDt3xdm+vwAnYsC9ConrEnRUsf/3UpEdCleYrh1JF92YsVFz5l4yVemJgtDS18+hN isqdASQd/H8xUkB8vDy4P7Yldx8vhPVNz0ioTrox/SBPHzsy2ur1xaxFgUrC4tLZq8uX R8ZKYm5K63T+zRLArLw3eGgIKP6AHwxlkngxdr63kaQuX89k+DvkYemIOtblWG1/zzsw uuADPe3hbHJPnSwmEjKlQsnXNWaJ9TPnjrmxn8bF4i7sWFAjt4g3SlEL0v33kfQJlXMG Hcbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=e3gIam+X; 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 ja21-20020a170902efd500b001751a9de12esi15748032plb.288.2022.10.19.02.45.05; Wed, 19 Oct 2022 02:45:20 -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=e3gIam+X; 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 S234123AbiJSJiw (ORCPT + 99 others); Wed, 19 Oct 2022 05:38:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230305AbiJSJcy (ORCPT ); Wed, 19 Oct 2022 05:32:54 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F6F317E25; 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=1666170886; x=1697706886; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=I2sO96QvGbKZASEZajyqgl5elACacZqC44Dvl0bF594=; b=e3gIam+XlgVph4eDQ6z9ubdV+2WM18A2wvIQXXEXAmPFxBxkK/XzBYMc tqVSOz6eaiYTNKq/GPQC5GoSa6kuAZ7PVhrOPSbW8gU9QirPd7JmxLiGD 3Cew/F4WCvg7olezTs9ktzdLB5+KaFDxdCgJMz56vBPhxCciRC6FeOyFP R05m6x5ijrCzQ1WNJ6Xj5FqmjqQ2fp0r9IsqyFlMcYN3AklpDZpUIJCYr zBvyUMgdxzI5i7qKqxYLfTRvocxqYm83KY+uzS11HAAG/MvOE+2QqkIH/ ivyfn3VlrI6I3q8FEHCGi6xlEsqLUOa5rrreAeuwdUru5vax841rJPIRp g==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="332911073" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="332911073" 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: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-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?1747108726440235633?= X-GMAIL-MSGID: =?utf-8?q?1747108726440235633?= 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: 4984 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp227159wrs; Wed, 19 Oct 2022 02:47:58 -0700 (PDT) X-Google-Smtp-Source: AMsMyM443WsWRfsVkP+FkznzD6t+wLubzVH7pgZ/yn1je2fSHEsTgniSwt+PtUshj5560S5X2jhn X-Received: by 2002:a17:902:f693:b0:17f:6974:cf90 with SMTP id l19-20020a170902f69300b0017f6974cf90mr7736205plg.62.1666172877821; 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=yY8UsPQAdERmGxUcnGI7bDYeynpZfGzXfsX1EVPMuWey7i7CxRSrYgJ86w/9nLJUzb nvIOBF7qafVc3wGlV0EdnpdgEsjSdZknvp+WIVF1GkXhev8nWEWQgQJaKSVLLgEQthEi yzx5+63EHWopekT5o0ZUgqgcrTjVVav4j9roJyTQL05KcVABOqIfmMJO0ONgj2LyKV9F dJHQs3KpkuTU0PyK5VyCkemSI4nNmFJA0KcTTHTcYgmrXCL0GUCPbUjDKHvaRhZGUF2c OrcIHOx85z/wY4EAwbu6gj+DxXskhXzeuX21aR/b6Sgn7ylHjQXeiRpmdYZjr3d7fbSQ ZFzw== 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=fUZmd5uM84SXprKdoW6WgvpLxhMjNESBO66wEEbp9lI=; b=YG3n+5P1TEuKYKnJ8QZMlaxvoGLIbDR2kolYTj+7/A2N5xEoNZfRF3EMYk0zSY+Hgc HikGbCxMpNGd4yzYVpIIYCan4Et1T926fkdyknDJKVRVlk30orF6YbpD6BbGnDHDwG/T UyDj30UkErAYRXyxIpLygciB2fjv6R32Qh6EAvB9m1J+2B3RWhPXrCkG/6j1nijlIIBe lQf7+xvkHKZcQdHVCaPAy9XFGOtEu8HfeXHEyjE+bXwsl7P8oBITSXMqyXciEzTa0sBS KgK6YLbXzjZZDDQ1QSAw/YXSkLRH60qfGdmvZT+uDrXiBznzWWw35+LO4gT3sVlRtfZe Sj3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dzC6e3Er; 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 d2-20020a63f242000000b004639c772888si18082845pgk.225.2022.10.19.02.47.44; 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=dzC6e3Er; 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 S234105AbiJSJie (ORCPT + 99 others); Wed, 19 Oct 2022 05:38:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233812AbiJSJcr (ORCPT ); Wed, 19 Oct 2022 05:32:47 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7439C1900A; Wed, 19 Oct 2022 02:14:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170886; x=1697706886; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=F5OoKeiZlb0GHRmkwQOoMqMFYKZ9krELi+lO3n3U0sY=; b=dzC6e3Er+s3afAh6HQwcvZdwGzcYNWFVMTCnuR8mOIjNQulINmgcNLSt zAO60PPfrDqeIXQ4ssBkQ5VMjeWVdn1a75oyJXjREJbaBHgZxhWDsf06i N/beIYGQbxCq5gn3cFZIweRRsjpBStbjWTDuq1u1kn++ea3b8DSFoWPxe OTpZt8NpDoy5XT5SIJaLDxIEOjnzNglEqD83r85g6jG0ZI3Dl3wpzjYTi aIGseW0gysxs86ngoAVXIC7VIAMwQxZhW8eiWX4Ad1V63/cz2QIiugWBe Gl6sQl90eCmykDj46w2jqLqNm+XUUMN9vPx8FdtLRfIzlxMC9uZWCNkMc w==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="332911098" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="332911098" 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: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-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?1747108891295694935?= X-GMAIL-MSGID: =?utf-8?q?1747108891295694935?= 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:31 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: 4944 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp226248wrs; Wed, 19 Oct 2022 02:45:22 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6ZaSIUF/SsIXrlyeqzgFpxR+LJsvwZE4gySc516f+FXeob/8Zm/dM5scllx6doXuF7xq/A X-Received: by 2002:a17:902:f806:b0:184:4a8c:f91f with SMTP id ix6-20020a170902f80600b001844a8cf91fmr7596985plb.45.1666172721795; 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=AkW44tqBxOqi7mfUVQ3YRlGpPmtFtBTuB81rMd9MMrWiJxwzSrWleN89AsejG6kFu3 Lp+3TEsuuSeCOKX2ChdEbJzALc+55iJIE1Cgqc59QCnKlDRNOu9BbjYl3gaZbSUEiG5G DQUNhESekmcM38hPb4r8EgtEmKvedmO6KxmNShZ7FuVjiCJAmh8ZKfn2VWd/a/xPqcF0 dg1KaMDRl8h/2SKraWnJFv0EAOUsLGBcjj+iEV7H/f/8nZI+msb1blkbAApcaVu+2ym7 uWrvxRMyPgU1MEL5rdmrE7ZbNMGyuiDiJSXg9cj2I3Ozf5mceRP+S0iK2Sp403wWkSLR QTVQ== 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=H3lBmR5xVlXPRfrJWSfzz5OfEznVMrALAcL4hlSkyR8=; b=efhUz2KEJ3zG/Va6CJGzWD3IRIrcIaoF102eCT+vk7j2Quy0caOAd+dJXamJvEXEuE XRZ8Vymks7vxiDCZlC1ETQvQB8lnbCdV/+zCm++h9zVlZQhAAYZ40t8PFo1WXoLjdZ5r 8mW29tvQ40kyiZwoibliZdw3dUd/tjJds55gxHMuT5qJ6oRlTUEXyF7PYbBR/BsmWoZK tn1UVM6tQ191DABtb2zMiU5npeTtSVRy1afYVss52kllY73FZhTpBaaBgmBoaNINxziz ERl6EiWsqASX5VRyleEuEMu2VjGcFbV4ijBGIRQpGc1W6i/YeKn7b7SnhRea5inKzxni BDMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EwsvAC7k; 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 a13-20020a17090ad80d00b0021019c01ab1si437702pjv.76.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=EwsvAC7k; 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 S234139AbiJSJi6 (ORCPT + 99 others); Wed, 19 Oct 2022 05:38:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233592AbiJSJdA (ORCPT ); Wed, 19 Oct 2022 05:33:00 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2E181A22A; Wed, 19 Oct 2022 02:14:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170887; x=1697706887; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=9JjB9NhwkUeToSoqh6CKP9O4pEka6rJgc5OpPDVaN7k=; b=EwsvAC7k92QXR8XjYoIcBb2sg0UMf2Doe9Vq4T0n0Up5xTphnFvQOfpe SMmi8IK1qQjU5nzu+o+2PCa8JRy08PKrGnUSCeSIjFl9hAe0pVeB4UOzx /EmFIuXy8vyumMGP31ozyWWfgCjLzHOllGlq8G+yoNVYnoWFh8kibzWDE ua/vrIXarWZTf7VEuCAw7tMzytUc47eP2a2Y/fQRYtRn+vHgI9FwRMyBW GoQSjjWIU77qMv9NuV4r7V9z7sxIb0tCsVNyrd2CxEzV5kddONTZJMi0I /5xA8rhliNHeh8Das/f280IGQkkrotk0JBnvTqserbqb9/fsFzyv/etnG Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="332911127" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="332911127" 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:42 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734118961" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734118961" 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:39 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , =?utf-8?q?Pali_Roh=C3=A1r?= , linux-kernel@vger.kernel.org Cc: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= Subject: [PATCH 24/44] serial: mvebu-uart: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:31 +0300 Message-Id: <20221019091151.6692-25-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?1747108728141227565?= X-GMAIL-MSGID: =?utf-8?q?1747108728141227565?= Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Reviewed-by: Pali Rohár --- drivers/tty/serial/mvebu-uart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/serial/mvebu-uart.c b/drivers/tty/serial/mvebu-uart.c index ba16e1da6bd3..ba9a6206daae 100644 --- a/drivers/tty/serial/mvebu-uart.c +++ b/drivers/tty/serial/mvebu-uart.c @@ -223,8 +223,7 @@ static void mvebu_uart_start_tx(struct uart_port *port) if (IS_EXTENDED(port) && !uart_circ_empty(xmit)) { writel(xmit->buf[xmit->tail], port->membase + UART_TSH(port)); - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); - port->icount.tx++; + uart_xmit_advance(port, 1); } ctl = readl(port->membase + UART_INTR(port)); From patchwork Wed Oct 19 09:11:32 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: 4943 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp226245wrs; Wed, 19 Oct 2022 02:45:22 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7+kFXB6HWdiibydh5d4AjXfKTygFWq9uomE9rM2KlxFdfoptqDgbWMyD0nft+tHaJWZIts X-Received: by 2002:a63:c14:0:b0:456:d887:c83 with SMTP id b20-20020a630c14000000b00456d8870c83mr6584206pgl.53.1666172721677; 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=RNsVYtpBW93CV6Y8rQk1HvS9aO93l+/e934ZaUSGojqA0caLHezcFpXGetohJ28Is+ O6xwLj9qjOMz0mDwsLSmPMO5Wk0JEe4E+wGrKveGl+OytLxADuwfzDRufdaTkqMdkxj5 nIBf4/+0UOGJVQrOPQGFzoxPuOpse8rD33Mn1eC0RXL8xvil8J4BBNRas0ezzfBwEw7/ +J/iMJ8gWQN4s8p9RUxyt6D0g52W9cVnmCsPSmf5py0KPCmBBMFtIr7gJSi4zL4dWLTJ ZBcg7WiGuEn1TIk8p4PBts+yK30yAWYgaYiuuCME4IfKgtc4lR5jUSC9WAyeUllJHcB7 mL2A== 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=AsD39YzvPQwJYfTJp7gkk6sucB23n4F6ZTn6DYBtup0=; b=dnHMO0E7E+Qqcm8Yssg+OPdBNCGLaGzer5nV5zrNJ0Q8Jt0Jcy9CPMv6vtet1pS9QZ tISexhAgOb2BovzAdZ6Fky4IcYDgTxGcdjbHb4D1ZzkNGFQtF4gACcmXcu7acRD9JRWL fiLuKWglLHTlBGQVtgoe75VSFswHSKbF++anxGxoBjY7+2A7d0wF4H/R/5c9ZR2tnpJP CWeak7allxsiluXZnGO/P5qJTGbKnsJb/DDjP/LY/IGQIka3H3uY2/cMEgAzzdIp13nB DLWSX0ZTylKaUJUFamR1mTLKRE2ZwdI/k8QkmaAMyK4fiejDg6sq34gnvjIGUtlLhyjO i+NA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NDiAhpzv; 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 k3-20020a170902ba8300b00176e4ac448esi534942pls.224.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=NDiAhpzv; 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 S234160AbiJSJjE (ORCPT + 99 others); Wed, 19 Oct 2022 05:39:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233883AbiJSJdQ (ORCPT ); Wed, 19 Oct 2022 05:33:16 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D75471A801; Wed, 19 Oct 2022 02:14:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170888; x=1697706888; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2b7lkKHY7NTq5kAOsL3D2ERH+kfAyQTXERCUZSQsanQ=; b=NDiAhpzvePme4KMFEP5y2PXZMt54m7joTrpcIBugStf1rrCNGm1BvVxV EmzEAXp4PF/xeRJGbOWfdMR9+SSNLVQ9ixmm91zhWgpz45JoL+H85n7JV 1wlrfB/bnUvWqAoV9qwC4ETKEnKnbZ6Y1bZNmgA4IZN8Rik0H96p8fcDb wgMketoBbG2AU3MHiGqqkYcWKSG2MQv1No6wuKYzpG8S991UZbZmWUuQe VR8C+waYgCMYOHsw1GgxFp3kkYlFIdAytGACH2kbZ6xEGtuq/FkwpvGIN 4KQUNRALlMIuNULhVqRJLcI6awbyh7rsWArJC2oal9KyHU7tGqcXcH44q w==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="332911154" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="332911154" 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:45 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734118989" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734118989" 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:42 -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 25/44] serial: pic32: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:32 +0300 Message-Id: <20221019091151.6692-26-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?1747108728233888368?= X-GMAIL-MSGID: =?utf-8?q?1747108728233888368?= Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/pic32_uart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/serial/pic32_uart.c b/drivers/tty/serial/pic32_uart.c index 2beada66c824..52d026865a32 100644 --- a/drivers/tty/serial/pic32_uart.c +++ b/drivers/tty/serial/pic32_uart.c @@ -376,8 +376,7 @@ static void pic32_uart_do_tx(struct uart_port *port) pic32_uart_writel(sport, PIC32_UART_TX, c); - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); - port->icount.tx++; + uart_xmit_advance(port, 1); if (uart_circ_empty(xmit)) break; if (--max_count == 0) From patchwork Wed Oct 19 09:11:33 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: 4945 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp226252wrs; Wed, 19 Oct 2022 02:45:22 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4SylER6E7XeYBU4Lc9pMX6HkqF8F8wGzYrgUIl8jRmmDIo3DES8nZ+Qh+1BMiL/MeNj9D7 X-Received: by 2002:a63:f07:0:b0:440:5c6e:5833 with SMTP id e7-20020a630f07000000b004405c6e5833mr6584650pgl.375.1666172721687; 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=JPcbssByaC71PRGbb52IEV+Ykmo4lhEeFHrAS+dHZEYalXMfOY/Tx6uklaFx9sLbQi ipBMX6x1GYwqWgqm35T6NB7swozUHLbZ/D28Xzg9a4c9lAUpJPe6UtkQZtnfYmJAeMZf pMt3Yu5WW9gyYSr4msIgaGsaefWXX4yvxAg/Dgc+Lr0TJi7evzrovjspgZcbZl1r9BEi TjIPcn4d7P5h/UhnRUXDtEuIuJ3/OtWLY9sPKq7V8sqp7B3tkyJiGXVBUdaaIErdgLco 13FJ+AsE4hY2V0O8X0YgTZ7Bq1EgDyqqiW3HwLP3tZAQX0QUPxMC2hEw8E35mquEqvPJ Pv3w== 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=ywF4/Ie3KPw4oNpJnB7CFCdKC1vsIVbb54ZoKpsn8no=; b=N7T2cY9uW4jGdd5OOEcZQH7tHaaLayUdSgArxtBEW34ZQhQ/L1o5wx/6zXlGaeRMhd ZFFKAQZW29+SaL6Oz/9ekUmvnKlZXkfaRIOPABtZNXG1L7WcvCBk9l0EDsCB9fVgHuZA iX3gyLUTKS0Plu9M6uAiZdPrHba6IhdE6bB52HVogNcrVBPs81nbiDcq4tyBA76/sdRj crjzExVHQhqfA63qCIXPyIwNAgvDb4z+1ECNZENxtjo42+3NHqVKPpi4gGv+Z8cbYEaq GWPOCx9fbI29f9GYkhsoH8IFw9opEo1aLwLoFfhBBZHJSML0ZJH5oS9OljTkwN17Nqc3 +POQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nksXm7A0; 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 c5-20020a634e05000000b00457f4e8e21esi17927964pgb.731.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=nksXm7A0; 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 S234173AbiJSJjH (ORCPT + 99 others); Wed, 19 Oct 2022 05:39:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231648AbiJSJdl (ORCPT ); Wed, 19 Oct 2022 05:33:41 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 861711CFDA; Wed, 19 Oct 2022 02:14:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170890; x=1697706890; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1SnEG++lmkrZFM5w3ZM3z5ZQmAONQeCxSy4cYq4nyY8=; b=nksXm7A0T00mcQlfL2JHJplwSadkfPmz3sjQM7jvi3x0lo3wwBL1muEP ZofP6Ucew1S+pvAtrPbR5UAJGcrsz+wp3rOtwT20T3yFtmyeaFFQmaQQl jcIdWsYHT16GnIEQszatBMdOL3tpDoBVXde9tSKszaRZNFXGUB/Ahjlem Uy8tWBKvwfMbzjTTpb1oUjUSEYCVZXapsoxtwsynPyAAUYnWkE94kOBUK tTqUcVFzlouC/ah+72vAIVimxNW65Q9gkvdEGNLEE/XY3xopxV97zgz9x Cho84nnW/bcbV9FLDWvBuAK0GE/njbdTJTA33b4y4dH42wbGUOyNmC2DB Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="332911187" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="332911187" 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:49 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734119003" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734119003" 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:45 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , Michael Ellerman , Nicholas Piggin , Christophe Leroy , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Cc: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= Subject: [PATCH 26/44] serial: pmac_zilog: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:33 +0300 Message-Id: <20221019091151.6692-27-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?1747108728227788570?= X-GMAIL-MSGID: =?utf-8?q?1747108728227788570?= Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/pmac_zilog.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/pmac_zilog.c b/drivers/tty/serial/pmac_zilog.c index fe2e4ec423f7..13668ffdb1e7 100644 --- a/drivers/tty/serial/pmac_zilog.c +++ b/drivers/tty/serial/pmac_zilog.c @@ -410,8 +410,7 @@ static void pmz_transmit_chars(struct uart_pmac_port *uap) write_zsdata(uap, xmit->buf[xmit->tail]); zssync(uap); - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); - uap->port.icount.tx++; + uart_xmit_advance(&uap->port, 1); if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) uart_write_wakeup(&uap->port); @@ -627,8 +626,7 @@ static void pmz_start_tx(struct uart_port *port) return; write_zsdata(uap, xmit->buf[xmit->tail]); zssync(uap); - 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) uart_write_wakeup(&uap->port); 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: 4974 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp227133wrs; Wed, 19 Oct 2022 02:47:54 -0700 (PDT) X-Google-Smtp-Source: AMsMyM42NqeRG2nb7jbaS/mgHCsHmP6NgA44Ld6Z1W1B+F9j1VN0EGDz1oaqEVewakuAqnPoglqU X-Received: by 2002:a17:903:2346:b0:183:fffb:1bff with SMTP id c6-20020a170903234600b00183fffb1bffmr7636048plh.55.1666172874529; Wed, 19 Oct 2022 02:47:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666172874; cv=none; d=google.com; s=arc-20160816; b=IE32M2tXWLBuwlU/xbWtzJOJGFpHl8Y8LCjz4bD/XS78BLVLkeowHuKBArnijs7fU8 pu98YpKTxcq0sPFYHp0Ga26aYYS2AuGjbJxs7eudtemlWQ97MH9QvNp18/F+CBBYKS/U dL1nBEE6mZJKokPxoFaktkqv5jX+ZRch7Me4+3rILd+BZ5U8hA+oKojVra0FTlNWQdvJ /NHo474+h0JZaii9juIwKzL995gvp+4Syt+BENxGNf5x8hy/vzT+itBm48PbsNjio6bR cekxdMD5EhVyRcQVQDt1fn+0I0Ntwq3Y740pB8MXwUd7XUAlml1yxS5llLZUGZZNIWKB bKLw== 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=Nn5cjPIUgfp2B673+cCrnoDjv4S2tNtXSBAQB52yjrk=; b=INGmqc6MNN6Do+cfHpMZmxgJqYirl3Wjc+GLdFPRSFSRec0UedTGmkGoZrhYe8qk+7 IJ05/TD3/KUpfK1tiC5vPZ3Lujrp74+36LTrZOcDEbPyn59UEvgCPOwSIiOgixdK1psB 1TRKiVDBTfl0F/jwyraiFGdk0XwwP1W5uJWXFKc2NUDTgkUcbFX8WjUao7mr9XD+tRyi DXfw2SRc/Mnj7UsOMHy+22qHxG0BYMWVqQr7WssdR1xt+qb7bqRoOdGp8pT5QcFhJPJk qzSQPz8ffAeH016yb2TGW4aEkZ2rQluRxl9ZDB6E0FfqT7cAUkeSvp0FQzmfvxIDlMPA z0HQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HwQ0b8JS; 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 d21-20020a056a0024d500b00565ec924efasi18359282pfv.365.2022.10.19.02.47.40; Wed, 19 Oct 2022 02:47:54 -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=HwQ0b8JS; 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 S234118AbiJSJir (ORCPT + 99 others); Wed, 19 Oct 2022 05:38:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233824AbiJSJct (ORCPT ); Wed, 19 Oct 2022 05:32:49 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 862CD1D0F5; Wed, 19 Oct 2022 02:14:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170890; x=1697706890; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=SUPklsG2WSSwlcnWLtfDOus/SL3h7qEsP6z+fE6Ek7s=; b=HwQ0b8JSKB9tyeF11oJj6YEEInljmBOeEpbWeQhYxlIWtRIj0skKO1W8 tX249mXc7V+2VOOP2gKNdTZnTeZrmvQnOAGUeQh7XOIc0koch+3sncMID qZep0nC35REA6fwcYoXsa7hsIaowEq4h3c6MPdUS48/MetjOOzbXxKtno x7vVnM/ciIcApLpP7Vfp8RA3jCERbhvyds2tx/6XfsHvFJbdxrdZ4+007 a4AAdqES4TgiES51orkRKg8l2YfBy9RfvWuL9I8A7E6/pi9yAsYd+YIUM JgHgnhyTC6HxYpaSgyaw+BVKWzh/oP5gXIxLwW14DdgxMn1D4P8O+L2o9 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="332911202" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="332911202" 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: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-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?1747108888053205170?= X-GMAIL-MSGID: =?utf-8?q?1747108888053205170?= 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: 4986 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp227227wrs; Wed, 19 Oct 2022 02:48:08 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4VBFHWzAhO/Lj5+RrnTauOvpXKvSV/xEEbUiFsduPdInXCym+jgLEiN6lRTEGnej9D1YAG X-Received: by 2002:a17:902:e741:b0:184:53b8:fb09 with SMTP id p1-20020a170902e74100b0018453b8fb09mr7421550plf.88.1666172877787; 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=v3t7G23Rd+qGgzpzUZc7aJdxCHK1ZqRB5EnM42YShi4h6EllvlDhp2UTccODejkxMd INrCdT6dVRYl9sI7kHdSPkeifN3KeYDKWfbhZ8bYvHfwQRENYOKYnjTEbp3eYR8tls2Y raq3zT3T0kBOYcaiNEJroU4QCIHTVTlURhzp+S1OIe48l60dd4AWOTWhhhYSXOttHllG qCA/plVfeW3qOlhm8iAIiHu/EtHMfViBUL+PAaCA6j1a7vooT+o8rm0WUuVLHbGte5XL ZE2mDshLa8FdWB3tEsmfD9aSOmVsh83e9xd8bxHqkbU6DymvmgEZjrMr5x8bhTW8IO26 ENiA== 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=+g1/80fMdPUsEBMB7HfIGflBHifpqadxc6vFJZ2Us70=; b=s/e6/MxBX3Zx0ypDH6+ppjT9SfVvaFgIaBhPh1kFtjQqQ5+6Ia/byAtr89oSQ2KRtI CiUYbRg/N3Mu4/Wjv7V19wwm3eUpsf7LyBVVIIkt5cIQPetdro7TTCvujYDsLuybwLa8 GzP9DG2h1yDHblM2huodA0f+Zdy64OkcF8FxRmMBN0uzUpq6U3v4dPIcs4tWrAvojWqn ylQm2J1jJRt2C7w6S/w3ECN8b2wfgQPRibaLzozHGgg6EGnTehZ93f1fab/JDftPFtRs wLjzr8ZaetHhytBe64fmnLhlrxFknv0zDyjh1gwbL59XfignMTCj3kHQppr4D40vZPzt PERg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HK5TFBUK; 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 j191-20020a6380c8000000b0043c8455a044si8835566pgd.150.2022.10.19.02.47.44; 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=HK5TFBUK; 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 S234291AbiJSJjo (ORCPT + 99 others); Wed, 19 Oct 2022 05:39:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233990AbiJSJeS (ORCPT ); Wed, 19 Oct 2022 05:34:18 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DBAA30F46; Wed, 19 Oct 2022 02:14:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170900; x=1697706900; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=QeLyseBRR5vdFFcCj6zBy2vHybO02Bt4+xdUVAJfGkQ=; b=HK5TFBUKP3lNhNuh+LumMk4iZgWVQmDiBCxdVvK+aKZLfCZoY6YK15UX 6jkjKk50KFhGwVtWyGFwF4y6GGw1gVC7DYPMW+Xdx3iPGRtBQEDIDche0 6Q2f7EY16hgRgvkoGgeSFa6HIAEr8CiLlPRkDDuCVJungAvqbpz/UZXd2 PlhufR4gjatnnvO+uBehdhRagzlssIvK6sMCsc8hYHoWyKOEJEN7ZQ2GH 3YXlN//jFFEJ6bl0lXFO1DZoLojVk68HOB/P0c140CPfXwgT5eKmtF1j4 PWKQORS2fe/UBuOmjBXENHB59YhWBpIuKZQGNs/e2GCuMWwXtQZF9Tdr6 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="332911216" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="332911216" 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: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-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?1747108891233621002?= X-GMAIL-MSGID: =?utf-8?q?1747108891233621002?= 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:36 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: 4942 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp226246wrs; Wed, 19 Oct 2022 02:45:22 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7rJesoEVVfz0diBDmkn/6faoAtzHtpyQ5SB6JOByw7sslmgXbwBGxmHpAFv/nwUsN91baS X-Received: by 2002:a17:90b:2242:b0:20d:a2be:95a4 with SMTP id hk2-20020a17090b224200b0020da2be95a4mr8801402pjb.159.1666172721681; 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=BaC60DeRTR8GSKg/vXlYq1EFw7qkd+cUvmNplsbmGJns94PHrdJNBmdSr130/HsYzW ZO2rWOHg0dBNfPoUrDQL2uDgvZYg4CVUXgiV6eMaXm14fB9D7N1tw5qEYlObu+4Po46v NAmZoj4h8wTHBU/v5O9ruO16yjF5wKhLpsGj8dahyDjkR6yEvplO15Z1tCUacUrR3Vll uQ2gip18FB7yNnmiULyjghVs5+VMmgenk4nFCNCVkbkZQxczB3zY9AsAPKvXDxja2FgS 8YrM/jjBdnH+tOviUPNC3otCz6Ji6aQLFn+pZsrsp2TELWZkEzF5b/xak5xAmPEKtmwU dU0Q== 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=8sqFNtXNSR6AfD8rIGGFMfvbSn4761ZjDTi4Qt8Wnew=; b=O6ugX+vvg+Or+/XS1kkyqph+nM/pr34i6EKCctky6uxtysAog4gr/PtJ3JQ1y6WyqK 04bzK6fH3qksIyX4UF5lEY/5RXhqDGru5/q9O+jtim2Y+Ds2kN/tljLAVcC4uQF1HFun f+jRSKNtzZVSo8n8V8qjpDrnYtfdjuvm2nzQqBcbYyxOXR3DiIjdQSGkFR9ATn1NFy+w eJtNWUxHMQeztAdOHprJef5TmSHf8oPNxcjZ1Uijw717c/0Yjo6KQjTkKKaZFGxcPuf0 Z46N3jBXSfxoW+3btcZwWHWKLi1NIhiu9jkNeg8680btyOSwSbI/Plfc/YuI/VMOSRJ+ ykvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="TE3UuaD/"; 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 c19-20020a17090a8d1300b002000ab788e9si21624700pjo.30.2022.10.19.02.45.06; 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="TE3UuaD/"; 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 S234246AbiJSJjb (ORCPT + 99 others); Wed, 19 Oct 2022 05:39:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233991AbiJSJeS (ORCPT ); Wed, 19 Oct 2022 05:34:18 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BEB3C349A5; Wed, 19 Oct 2022 02:15:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170902; x=1697706902; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=pFpipHT5cKor3PMFt9+dB1A/lefpRtz+EzeC6pxpdNg=; b=TE3UuaD/Qbzz3S/BgvtVRuwAv6QJS6ce+BbSnQI3KtRdSNa/BqhLu675 bzKv+ulNcbJ+stQFd6mNRQJGLDyyqypvH1FrzidJmw4pBvKIvDcarsokA MuOCFd0RGbmsqlmGn5+o++PLw3XKOBYismDpf7rc5FClorUWzr5iaHG0Q ECWpunquhO7VeA1SUdNel70lVLOk7S6ec/p34fsuBPSp3OZBoVWyxQA2k L1bzk+7dQ+jpkPuE8IdxrnhlQKjHMEfcNUMA89S3lqpUMkF3B4p7pmVON sRyLf4xbv79VIS5m+QBaoS7Vfz+Ne3alG7h4w/7FD9vlsHRoN9d8FIgJQ w==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="332911231" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="332911231" 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:59 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734119129" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734119129" 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:57 -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 29/44] serial: sb1250-duart: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:36 +0300 Message-Id: <20221019091151.6692-30-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?1747108728200599724?= X-GMAIL-MSGID: =?utf-8?q?1747108728200599724?= Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/sb1250-duart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/serial/sb1250-duart.c b/drivers/tty/serial/sb1250-duart.c index c5d2b6cdcb4a..de56f383964e 100644 --- a/drivers/tty/serial/sb1250-duart.c +++ b/drivers/tty/serial/sb1250-duart.c @@ -399,8 +399,7 @@ static void sbd_transmit_chars(struct sbd_port *sport) /* Send char. */ if (!stop_tx) { write_sbdchn(sport, R_DUART_TX_HOLD, xmit->buf[xmit->tail]); - 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) uart_write_wakeup(&sport->port); From patchwork Wed Oct 19 09:11:37 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: 4941 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp226242wrs; Wed, 19 Oct 2022 02:45:22 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6TFDmq6mMQXdJgqhKr1tvx5lBHhxRQ2IpbPwnJ5sqbfWnbgz3m0SZzZqR6n33wKPtlIezY X-Received: by 2002:a17:903:24e:b0:179:b755:b82f with SMTP id j14-20020a170903024e00b00179b755b82fmr7314086plh.34.1666172721544; 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=nCJRTF5qQdvzAnfN2lMFtOzRwIpv6KBgTre43sE0FULY0WouPU5rss6A2ghdBlPODs isGw9VKbXG80noCv/yJkTHJW59KnS7HX8MN6BtLh1qz66En/COgBQNswoTtUXMSD/scn 4BRReYP7Vf+wjvQgqT6Z/bQF8ZoDbpdyCtMadV4JbQQ5t3soeWZjJwXDHs2R7lw4iOPY Y6GPqlYU/B8tIO3KpmDsLfECgkSWEsMi9ccB/BNFhcFzXV+h9qqtJW1PmEqH3p2WLeCm mFRN8gim1B7hj2KAo0OGKLz/wnvexqlI0+PnBHnJkgxlUcfAWmAvq1M5Qaa82d0iObXH AplA== 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=xJbDh+jFvpsX3CjxfeUVN1anZwl8AsyWx42QE6zve+I=; b=lunaedI4gDYWiit/pR63V16anzAduB8iJ0eVkFqRENOFr5caKLXsrl3Q7zuPoxnA5d S/aG1uPrPListBVlKrvGGG9TtdTd1oOKqFxkZN4/BMa3u62yk+BDmL5kRrIdcRrO5Kxg KKehBY0S6LQtyAO3QVH62yXXVR+tEK08Dfl6FeIEvOLi5HPbB5RHR9ypNq2w216JJwwo yp9lCfQ7ESF3uwg9yluX0ZzOdpIKbtVljttry17aoJGUWTvUBNBAAvkan14ifqAJBUP7 A5t97AM0MVS8OiM7sbK/FrIAdbTf5nbFCmr+sMLNvIxnuG1KKflFcJwiuCGFFYbOmjHm REqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=D132zUJU; 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 w9-20020a631609000000b00458ce4748f6si18027587pgl.409.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=D132zUJU; 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 S234228AbiJSJjX (ORCPT + 99 others); Wed, 19 Oct 2022 05:39:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233973AbiJSJeP (ORCPT ); Wed, 19 Oct 2022 05:34:15 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05C1136DE5; Wed, 19 Oct 2022 02:15:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170906; x=1697706906; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Dg1euLJph2oJfBTgbX0VltmL86AsRoveKq8Ume+G14g=; b=D132zUJUTagBUWr4BniZKMJ6ThSSnew8/XnHpH/zUJ7ellVOMCFd8FDB r+BFXFITKBNVIRVqdlXRRxwIP1LxlZqzoqztpwTBg335O4T8W7/P6SfjJ 7bvP9HF3w+K6LMBBU0EfdzVgUczHEN1PqoC4Ie0058zz/GTXdjCPCVS9Y kkD5WGHQ0hq0rEADIOB2/oGI6lKfFMun7xQiWrzZ6q3S9wSFAq3tgn397 Yvw3cPXDAkEgQNqKaWsGN+EK1zaTqpiHW42zOysH7rO0cY+lvCrwKfyrN hpN9CUBWEeKtCIsHfcj5cPtVmQjfrnqsE3TxfjQhrMgV3/JQsmZKQo5VK Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="332911237" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="332911237" 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:14:02 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734119142" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734119142" 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:00 -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 30/44] serial: sccnxp: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:37 +0300 Message-Id: <20221019091151.6692-31-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?1747108727382083234?= X-GMAIL-MSGID: =?utf-8?q?1747108727382083234?= Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/sccnxp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/serial/sccnxp.c b/drivers/tty/serial/sccnxp.c index dd98509f52e5..7df687822634 100644 --- a/drivers/tty/serial/sccnxp.c +++ b/drivers/tty/serial/sccnxp.c @@ -468,8 +468,7 @@ static void sccnxp_handle_tx(struct uart_port *port) break; sccnxp_port_write(port, SCCNXP_THR_REG, xmit->buf[xmit->tail]); - 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:38 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: 4938 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp226239wrs; Wed, 19 Oct 2022 02:45:21 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4pr0hk2cVa5x4jfZoOJ2Z8U0b4MVRAYmE5/Hdkv+8kniSAmIPW0KVesqxl04XZ+YqVTZGg X-Received: by 2002:a17:902:ce03:b0:178:3ba6:f731 with SMTP id k3-20020a170902ce0300b001783ba6f731mr7726788plg.115.1666172721208; 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=Y2HhBcEB0qgdfc+ZeaW7BHIRzNRQO9aC1f57FSdRGOoZLKSdqg8blfzI0DHNLihf+U xp8+/9435y97KbxDEdqMp55OLlHTojA9NSUcf4aWTKswtm24m1uxFhPNKAcePbHBMe5O dN3QxFSrRSfCgqhZvAqQqCsGEHpSTNZDedYlL52zY8uZocsaGRMWRRI5RCMj+n3LuY+j C4UBBi3xDq0d/16v9RM5i1acOsg+0uTp6+qwXQdmbefyEp+8IZ0QmDR5w6ItrnkT1NF2 +l7X975QPwNkEnm9fJm9zXIwKnniUH1DFpgYF4zVusOIHPV4DZ3K+k1BzicIpnqQcQ4N McCw== 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=PIcU7EVCnL8sLsvbCOTMKwhrNscNG9Ybc4iN4KpG2ys=; b=Ppo0FJYe6AyIvNFDgyiXbUjgnETjx1statPVz5XaDrtrHfYpiavhfXCKJvV2mYCubS uPoeolDW3OcZVo8xqXUI5Uho8DSRJyUrTAGBddf1tQdSAKGzgxEVNrKeJtcoSEba1mhU UHDmJo12+rJ+1lTU0dpSGT0PwzdIkBFpm02beFviSQoFIoqewyC9+M6o7+b0vjYx0+qJ eTHZMQ+kQp6Cv2qxLKEIN/VeIKxPxiLV4BNgz6liScc32HiRJG67Dk1lyBl0PRlQaBo+ MFggmG+8pOJ6oN5fje8wQjuzgnWBlETxw8Xk8Hwn6ofAIlo1bcVpQNP0g3745QZqYPYG xXvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=XP0UX+Ei; 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 u10-20020a17090341ca00b00174a7230e39si20082010ple.329.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=XP0UX+Ei; 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 S234198AbiJSJjM (ORCPT + 99 others); Wed, 19 Oct 2022 05:39:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233969AbiJSJeP (ORCPT ); Wed, 19 Oct 2022 05:34:15 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D82783BC6B; Wed, 19 Oct 2022 02:15:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170907; x=1697706907; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=GyL/mkBnWw9BwSgBpj4b43K3+WPQ3jqn+0KpOYzRE0M=; b=XP0UX+Ei2CkvB4C19RJtrduq8F6tE3lCoiIxOIltmADxJtlLFqyc2hES TZVazlw41PYIbg0n+ZURc8zPClk3j9czRoC3e8W5Mk+BPX/163AMNKgwc 1SwXp0Z3sEPZ8htQmcyn6gZjukzSWbyeeESZE2RQOnEn7edEhhF+HlZJK iNt8ZgtrxI/icsOUuNGAhAY+rcr0cq1GwN7WllK55uE9O+7eIgw0fD9Zy q3WMjn8XYG08wJdPpVUzEiZkgj07kJTzrXKTAii+y3Uu3J2wonu31P9Mn If2orn0Tz1aFrV49oGP+js0ncasVhSuHBwqvutkHfe0wK7tAxdkWF5oNB A==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="332911244" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="332911244" 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:14:06 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734119160" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734119160" 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:03 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , Laxman Dewangan , Thierry Reding , Jonathan Hunter , linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= Subject: [PATCH 31/44] serial: tegra: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:38 +0300 Message-Id: <20221019091151.6692-32-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?1747108727645790191?= X-GMAIL-MSGID: =?utf-8?q?1747108727645790191?= Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Reviewed-by: Thierry Reding --- drivers/tty/serial/serial-tegra.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/serial/serial-tegra.c b/drivers/tty/serial/serial-tegra.c index b7170cb9a544..4304e3f9307d 100644 --- a/drivers/tty/serial/serial-tegra.c +++ b/drivers/tty/serial/serial-tegra.c @@ -496,8 +496,7 @@ static void tegra_uart_fill_tx_fifo(struct tegra_uart_port *tup, int max_bytes) break; } tegra_uart_write(tup, xmit->buf[xmit->tail], UART_TX); - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); - tup->uport.icount.tx++; + uart_xmit_advance(&tup->uport, 1); } } From patchwork Wed Oct 19 09:11:39 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: 4939 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp226244wrs; Wed, 19 Oct 2022 02:45:22 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6DxW4dCn3ID7JPWY1zn/nRa3hI1utjuGDfGp8/q3xjFKwSQex7qXoZJYpGZBTmVnQ9G68m X-Received: by 2002:a05:6a02:11a:b0:441:9db5:e8cc with SMTP id bg26-20020a056a02011a00b004419db5e8ccmr6330132pgb.345.1666172721892; 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=lp5iEme9/7pOV0xYWL6ViZ68YPllNTJcPslMA4iCc8otrr6Z8Lrz+aeGBxAEX6SmW/ IKWHtbYwEQWfaVuKtDqaeqhZXNuzHkDhqCSZ8U1hZHZjwvHcFEdOkM5imGFNnLrcQL4H LthtVdMZK5CJODIH/NFC6Lp6QALpbrFOXvWD+qVWDLVoduD+tdOG4HEuZ5qSyv5jfFHH m3HLTMpAs4zVYX+Bg1ggzPVTv+HP4oqG9NbziRmYlG4Zja5GxCK7yO6H7WNTLm95iWlJ v8IJcAQ0Q7dLiZhGbAHXpLWWs5a5o7r9Y6Kz/oQcpm/Gs4TYbthnU7I3w65JOpp5I7Dc 5J6w== 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=DzOU/O38zMQv31tJJGb6H4FUwTf+K++wp90ToC//LJI=; b=pNyAb39AtHckH5pXSJErUh/Ux6KiG2LlUeV/cIefYRBLd3MzJ4AFLLdeJJq3nQqlPj lbxuIdRYDxAVs/59796UoEnTuWx4XkbPNzb5TkrxH+QPbhTAJgCra5lLYgK0nfMOgAVo SClFF7UWNIaviXNQGcSrCsueGM9EQdN7VKKIL7pWxe7dVnwpYGLQVMK1LPZUvUuPBL/j fVVwRl6ntf5SlHncsg0eG6RA3fuRkQdJpRPgTf/JtdvOfvm/8QQDCM8eL9/c23A2oZ42 THT+CQIg5yt2WGg0ykJIJWqM+EuAWALUmonBZ+pHplSQr9ISbF+iilBXlIOGYna/3iiB BL7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jcKLl2OF; 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 r1-20020a1709028bc100b0016d67ef8943si16045234plo.187.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=jcKLl2OF; 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 S234214AbiJSJjR (ORCPT + 99 others); Wed, 19 Oct 2022 05:39:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233971AbiJSJeP (ORCPT ); Wed, 19 Oct 2022 05:34:15 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 938363DF1C; Wed, 19 Oct 2022 02:15:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170907; x=1697706907; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=TCKozR5BIs68DvWZSZOm+IJxNijydgnxhkgkhHpUBtI=; b=jcKLl2OFRlRvgVwK8Pc+H+sxcJ/Wc64aw/PtIjN3KsIHevWtL62bpzO5 7hzgrtFgRXasUB4oYIuecke8znM0lNzLiLMO0lA7C5N4IqnGvdw11GvwH bhho9EyB/A2WbUxEgFpRLzJQuU/MKR6borzTTBkbuBnLyA1YuAcCWe703 OtkHMtEXPmkk+SOq0WmAUzrACUflly4S8jCBzyn2uSMnrH8Sli5JX7hH6 c6NsdmCzr1x3grKBCBl8IiVNfS+8BzgLY1awZOztWr4XXKMYIEFe/8efY W+TYLEzjg/sNOlWVOPkrNzb2dBQSboyVmp5sXc8AmOErmbnbKf8mQE//Y w==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="332911267" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="332911267" 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:14:09 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734119177" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734119177" 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:07 -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 32/44] serial: sh-sci: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:39 +0300 Message-Id: <20221019091151.6692-33-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?1747108727865753932?= X-GMAIL-MSGID: =?utf-8?q?1747108727865753932?= Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/sh-sci.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 62f773286d44..a92a89780357 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -1181,10 +1181,7 @@ static void sci_dma_tx_complete(void *arg) spin_lock_irqsave(&port->lock, flags); - xmit->tail += s->tx_dma_len; - xmit->tail &= UART_XMIT_SIZE - 1; - - port->icount.tx += s->tx_dma_len; + uart_xmit_advance(port, s->tx_dma_len); if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) uart_write_wakeup(port); From patchwork Wed Oct 19 09:11:40 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: 4975 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp227135wrs; Wed, 19 Oct 2022 02:47:55 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4OeZoTYHt5UsrwL/2uGka6sT0anNBcxABWTmgEORckshhpf+AWKHbI6L55B75b78yCVs6l X-Received: by 2002:a05:6a00:c86:b0:563:b89c:3d0b with SMTP id a6-20020a056a000c8600b00563b89c3d0bmr7900141pfv.50.1666172875360; Wed, 19 Oct 2022 02:47:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666172875; cv=none; d=google.com; s=arc-20160816; b=dV0xV0f4YrShO7ylQFpNTlELZ5Et8q5JwwSuUNsuynmy6CFIEqnk13aITJMjk3Q81X 09Bf6Od1Hpv8Fb4pd6jySzdXNYx4ZWTP2TuVxatHeJfcvc5jm3W9OeQQeYPA9GT0dswp DvzKx5ggoaqMzqs+ln22dccddflts9XFacUEu+GKc3mDtw0yuTJjd9iUqMLF4U46Wj7N 0A9JFqcehSd8Ui0+xZZoVscVKVtszbGPiWhCZ4lwgTQzlg2bmlNPg9NVYzTYhng2tjQf UAs4gnk6g/tkLSdZ54ju15XN2zkp/SDGkwYAW7p4AulBFULmmFK8NaxTqoedQFhdGuno RVUQ== 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=paZ/SS1F+d4FEhf1BdaEWN7r8nMYwZZTZSlvmr0Zih4=; b=NwqoWCdK999z3MCsKEY+Ddp7XocvOsCdXg/JZw27R5falpxp7/gH2Cb6rTO6LYqcH6 C60SwsLpSghbZjqlf9iUHwJJ7ggAJk4MpHxq5bvybjEXkpYPYLif1ILC/ZtxXi12gRJr ckZBGX0vfjfujAURlj148sV1Jc8LuXkelinpfJbjTEx06rIiBqkWLv8SPnghPTscmoTV kDGGwSUSKV0Rpj3xyHi4X/u8hE6aRtAuNHcM71MVxDOhvei7QFl6+Kto6WAUIXiYf9Hg +6akqTCGMUKgvWv/QMCcOowAsO5P05QLslFeUus6tBVUoG7D4IbISBtQNWQPiyvz6UxR EgyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=c9OQZPNf; 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 l9-20020a170903244900b0017d2c45e93fsi20221369pls.169.2022.10.19.02.47.40; Wed, 19 Oct 2022 02:47:55 -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=c9OQZPNf; 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 S234269AbiJSJjj (ORCPT + 99 others); Wed, 19 Oct 2022 05:39:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234028AbiJSJe1 (ORCPT ); Wed, 19 Oct 2022 05:34:27 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F252513CFC; Wed, 19 Oct 2022 02:15:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170912; x=1697706912; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=VdtdsxsRvs8JMRXdzAFU0lT7qdRtckYO+MxQniqr59g=; b=c9OQZPNf/ysw7PXeS0O7HkqQAD4kYus0CzRhyPxU8GfLvYmVWkZGOBdo C7QtjshH9QAjF81901SXbQS+NFkwPPC2klpCEzNqqX7QV1Q6r14nVtzOm ezDGe4FFoAmMkGut+AyZI5Wx+dK2dmVBYyGDsAN3wa3GUlf2cZyob4bt/ +Sqh3xqyK2QNnuL1EPXFZH5hlt+YkIC1Ss5ZBEY+fB7X+1g0ECP0k5Ejw IYCmfDiy/jCFNah0lDpEwzJqnpRxzYbEldeLtZ8L27WPvFChEd8MfMLdT +QA9l31qhi7NorTNZZse0z9vqYTJ7EGrK2A7SJ5ygHgxxqViT0cLhuwGm w==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="332911273" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="332911273" 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:14:13 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734119193" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734119193" 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:10 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , Orson Zhai , Baolin Wang , Chunyan Zhang , linux-kernel@vger.kernel.org Cc: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= Subject: [PATCH 33/44] serial: sprd: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:40 +0300 Message-Id: <20221019091151.6692-34-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?1747108889099420047?= X-GMAIL-MSGID: =?utf-8?q?1747108889099420047?= Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen Reviewed-by: Baolin Wang --- drivers/tty/serial/sprd_serial.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/tty/serial/sprd_serial.c b/drivers/tty/serial/sprd_serial.c index 342a87967631..eae700809342 100644 --- a/drivers/tty/serial/sprd_serial.c +++ b/drivers/tty/serial/sprd_serial.c @@ -206,7 +206,6 @@ static void sprd_stop_tx_dma(struct uart_port *port) { struct sprd_uart_port *sp = container_of(port, struct sprd_uart_port, port); - struct circ_buf *xmit = &port->state->xmit; struct dma_tx_state state; u32 trans_len; @@ -215,8 +214,7 @@ static void sprd_stop_tx_dma(struct uart_port *port) dmaengine_tx_status(sp->tx_dma.chn, sp->tx_dma.cookie, &state); if (state.residue) { trans_len = state.residue - sp->tx_dma.phys_addr; - xmit->tail = (xmit->tail + trans_len) & (UART_XMIT_SIZE - 1); - port->icount.tx += trans_len; + uart_xmit_advance(port, trans_len); dma_unmap_single(port->dev, sp->tx_dma.phys_addr, sp->tx_dma.trans_len, DMA_TO_DEVICE); } @@ -253,8 +251,7 @@ static void sprd_complete_tx_dma(void *data) dma_unmap_single(port->dev, sp->tx_dma.phys_addr, sp->tx_dma.trans_len, DMA_TO_DEVICE); - xmit->tail = (xmit->tail + sp->tx_dma.trans_len) & (UART_XMIT_SIZE - 1); - port->icount.tx += sp->tx_dma.trans_len; + uart_xmit_advance(port, sp->tx_dma.trans_len); if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) uart_write_wakeup(port); 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: 4982 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp227155wrs; Wed, 19 Oct 2022 02:47:58 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5yiZq1VGtcDb2+EpEenJGOwBfhQRmTc35wEA856EiXn7O0tZ/+3o65PGVYikj1BremyE6x X-Received: by 2002:a17:90a:d397:b0:20c:7a28:8834 with SMTP id q23-20020a17090ad39700b0020c7a288834mr44356605pju.153.1666172877789; 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=akO7HXqPIaicblHTuvJHENweXXQbAyLot4cO0ueJsJ/Ru16c/RzAi6czfoCJWQW+JZ iVJbSQxnNr3lUtl943uuk7AcEsCYi1SkQuIAnJXZJg5listWTTIGgeGVX1Ttha4yHKcK vTPkMxulN689wHeRWZNgVu9us9D78VzMqy0UN/EHWhy3SlJzB47d3aiqBV9JqGnuJ2r+ 2IvqnheEGyKf53Fyhw5XRVnpzrcWANJJC+IQy7UB5MJ6OrKLO1gxPG5ib1blnGeI1IWq 8RSJUxJKFEdYFqv/I9Roa2m13HxrT7ltE5/riJ+sdfkDh0LIh9bsD+vgwWK5m1H880+6 Jv6g== 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=MWajHwOVXDSV9AyW03mgIBeKq96H7eXpJpY1b4zsvsw=; b=hKpkOowv7bdKVqvkGsuIZCIO2Xr8GKX1IOKQAWQWFyap32he0hhcNifowvX2v23n05 OBXBf0sQGgQUVY9ujewN5oUA4HRto4Jhm+6NiknPcGhsPDGrT5FMD+IQt1DnzPcMH4A2 Gf7xNp1IasHr2NKdHuzINm8C4+IIjQsvx5pHlIw3XJV37LHsErAI9o7tjHutNAVgi2L1 d/Hz9QkI8sHQPmoMP5ZVJoTHkWGgE5z3BGTQ642zT+qnlBGrCJZ1jztV/rfMJ0dMTQPG X0/TKZXVjUjNPkelTetPVkWVYYVzCsXnAVmrQo00z3dipbQtp7di3nfNycXurxit0Azo uszw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NXU1U4yJ; 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 eb19-20020a056a004c9300b0053b082ebe62si15387715pfb.269.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=NXU1U4yJ; 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 S234304AbiJSJjv (ORCPT + 99 others); Wed, 19 Oct 2022 05:39:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234058AbiJSJec (ORCPT ); Wed, 19 Oct 2022 05:34:32 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF6B344CE4; Wed, 19 Oct 2022 02:15:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666170912; x=1697706912; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=VQJoRuNRdeIpnDk2ac87eJh17oqgdcNVue8yLDhtyxs=; b=NXU1U4yJd3rTUR9GE3weNUpfEhpPcLCST84mO4QLdlUt4JvbHQQ0gpz0 2rQ0gPU/kQN9XYJy0kbYB5GPaHOXidIPiUum1kW/sGxFnpFEsoFkB6V7b Rzq2vaoja1cKILnV1zsF68XT7woM0KYZilKj2NUl2F0ZjkVJItFWPRpiI uNETJSmkxFynVTHYBCkASzUNRsOd/hA5w8K0jWjyTcXZuAYDmeht5LYs6 g2a9rwpTpynxIdDiXdA/4uycBkf1Yh45yMWHnA+SHEJZLrxRW7MJDI3hM PdMfbHBRJgeEzI5q98rZvQkCAx3ffekJ93Tuu1uMfeHPe2lzvtb/k+qz6 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="332911284" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="332911284" 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: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-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?1747108891474384168?= X-GMAIL-MSGID: =?utf-8?q?1747108891474384168?= 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:42 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: 5028 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp246465wrs; Wed, 19 Oct 2022 03:38:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7fZUHXtPlHac32clvGIvj3OlBXaVARKAr8gqqFlJb0AggpdJyQvgkjfCy1lZnoFkv2GjPB X-Received: by 2002:a17:907:7245:b0:78d:ec9c:e743 with SMTP id ds5-20020a170907724500b0078dec9ce743mr6245201ejc.466.1666175897535; Wed, 19 Oct 2022 03:38:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666175897; cv=none; d=google.com; s=arc-20160816; b=zSWeoyPDzy5Q7ipIOb5BVszAi6iRCNcL0NyHA05PFGIZ7femPU/3Epu923GTwJKeRM u63QFoOjpCPme/M/SgTnfh1m9IDxIFYsBv+JDTXpF69jGTy2oCmG9L/sDJeDzmQAGKW2 ybUgfwbPaSrWwvmUh15ZDjpi+OW22VAloLjvrSN0rAgIaX0L/iZVAazvbbQl7A2BkcXH AHD1Xu/SiEswPpvT9ka0Etl/X2DhUcwHyGKrU6x6YzfqoQ2WOSXSyP7h69+coA0pR9V2 oMYoRO68q2LxznmrbELQ4pdUlktYBkztNwlYzEBKARfJi6ieuM63VfYms17Ez7XYWdwy JZxA== 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=XFw7rJ0iLf3DkjlJBVgbrUjjLXUOGBgqI+X8fArz/Uo=; b=RoTi9jqu9UDs1wdJHmSc/lYikiYgWUWVxg+12RC/G6qAHM28zryHScKpOxOSCczLKl P+OhjefC8+FU+3FjNQPM2vfV/4P8OkAORhbgwbHgKHP/A7A9CgsmfcpqMvE9n6mOvsB9 MN2zWhLn2CpXv4kbiPEZJNCs81MnhZ9Ld/1KH46xD33sHqEd9gBfAoW9WWEj1pqrlpZk Rx25t2JtY40TAienaPAEx1U9nMm0XuIozAPnAQUaNiHkqUjEBsqNIjRX8ryvPrSWy+Zz +Rw0UHeFmddRB1ghtVTf92JauJCjtyM2Mrh9d7q7rPlk7JXMWbMbQUzcW7okjUqsUz0Y lRhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=PZ5Iislg; 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 di20-20020a170906731400b007918ad4cb70si10040277ejc.366.2022.10.19.03.37.53; Wed, 19 Oct 2022 03:38:17 -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=PZ5Iislg; 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 S229993AbiJSKbx (ORCPT + 99 others); Wed, 19 Oct 2022 06:31:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229648AbiJSKb2 (ORCPT ); Wed, 19 Oct 2022 06:31:28 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E315353012; Wed, 19 Oct 2022 03:10:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666174225; x=1697710225; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=n5aFl9Mu8iuEfY2C1Fx3TcqbioaUsdGN3eCRbvIqKL4=; b=PZ5IislgviFNhdl9hIlTuCGjaryVnzk41jy8WJxLPG5q+O0aT1ISlTCc Jsgy2rAtDdzzlL+RpWDR5pARiynl6ty4XKG0DFK5iHJJgclRDsniKqNmI ExYKURM9P2Hy+1RtMVqKkbKCnvKpvSNsqKpWYs/K8MZXZ4HiV83IzVk6W E6FIRKjlN5EDe0zx1ZcNCpuA8kl9yFD3x4KUmJJhKuuOWYVIy+ksSKE6Y QlVW4N5E94uMQG5d4ocxPb3LJDly590bHdhosm9X3Ldb1gNkTMYPAiq8h NIezqKnFLINCEGOiL4uD6k66zpGpjXR/wbKc1Cr0ZuDHC8dFkg9y+FyX2 g==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="368407271" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="368407271" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2022 02:14:26 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734119231" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734119231" 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:17 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , "David S. Miller" , sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= Subject: [PATCH 35/44] serial: sunhv: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:42 +0300 Message-Id: <20221019091151.6692-36-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=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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?1747112057518669883?= X-GMAIL-MSGID: =?utf-8?q?1747112057518669883?= Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/sunhv.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/sunhv.c b/drivers/tty/serial/sunhv.c index 1938ba5e98c0..16c746a63258 100644 --- a/drivers/tty/serial/sunhv.c +++ b/drivers/tty/serial/sunhv.c @@ -47,8 +47,7 @@ static void transmit_chars_putchar(struct uart_port *port, struct circ_buf *xmit if (status != HV_EOK) break; - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); - port->icount.tx++; + uart_xmit_advance(port, 1); } } @@ -63,8 +62,7 @@ static void transmit_chars_write(struct uart_port *port, struct circ_buf *xmit) status = sun4v_con_write(ra, len, &sent); if (status != HV_EOK) break; - xmit->tail = (xmit->tail + sent) & (UART_XMIT_SIZE - 1); - port->icount.tx += sent; + uart_xmit_advance(port, sent); } } From patchwork Wed Oct 19 09:11:43 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: 5022 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp246068wrs; Wed, 19 Oct 2022 03:37:09 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4hNWKgSEdqQaWKwPTC0ZjCB/MimOO/UtvytEAbxCgh6wykbhD5Tc58JoXEJeg3dMH+oSY5 X-Received: by 2002:a05:6402:520d:b0:45d:b6a7:cdba with SMTP id s13-20020a056402520d00b0045db6a7cdbamr6788405edd.282.1666175829711; Wed, 19 Oct 2022 03:37:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666175829; cv=none; d=google.com; s=arc-20160816; b=vBAIrntjun59cxosdlyZH0hhoxjNO4XlmPKQyifORAs1QQU+4QAYDsK8tilZissV4T hAT0Hz/uXXVSghjBnc7dZR/+iLEDmBJ09xfZlRCQQzUQ1psPqVg2SDBmWooDJVx32Jsg IncHoTTWHRRDpb3zs7sA1CCdV2/yKLu/AHLQQHkY8+SM38aj+pbkU3873UWwEYZwrKnn yDD2FC/LYX/9m1O6Gms0PnpZDhJ3pl0jrimjPpdC9pDtcrATl9ZKAzmMgbZ1iJfsmBbj S3xPmXwhvg/Ahly2W7TAG0GQnc06JOd7IFmvbkIs1gF7hEm59Dl2xxls8P/Fg0SU4HHv Fl0g== 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=9qkqxZ5/8pcdIqOBmK8o1LEtWKPnuFrrCucCJpgXGBE=; b=hP44XecRZe7oGjC+u+5+woTvPkuL8SJGT7Hme0XnFfq9aG+8z8BuEPZZBfZtnPGwV1 w3JyHSql0AaIN0d+01z6QNkYFSGxDLqEFOu57v8JqqWIoe5cd18gXABaRObNEI6v9y2F PjZfA7DSxcsRtUYrYYApXJ5fkBPAEaaZwnaNzUjTA8Ymfip2TprBRc8M+a91GH0QZaNH Cbu6IkehDlYg1sgQxMnqcIKzxM3bXHIhDqa7brAVp2NHYmLvjMPANAPgx7CQKEZXnrYi 0e7awnNIOt2josLaz8kwp/VMMBd/IuCQFrSDMuG2nFP58kmnOVnO7sG4CJKjrdVS70yq Ty2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Yj7TgETk; 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 g13-20020a056402090d00b00458b71488bdsi16217766edz.388.2022.10.19.03.36.45; Wed, 19 Oct 2022 03:37:09 -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=Yj7TgETk; 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 S231147AbiJSKcL (ORCPT + 99 others); Wed, 19 Oct 2022 06:32:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231251AbiJSKbf (ORCPT ); Wed, 19 Oct 2022 06:31:35 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2CF8D13E96; Wed, 19 Oct 2022 03:10: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=1666174225; x=1697710225; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0dCpdfIWylLc1GOfauSgHmVL4IjSgKScyJXDK7zGd8U=; b=Yj7TgETkiEshYl9BKX1+arSwxMm9FaqO49d85PblMgfSeiVByMvW3Y0t ejWurCdPG4+JkKsQ+Nwiz2NxOJDMLRjWuFL8LOa7pYPyCntTDV8EIc6m7 yecZpXD5lHmM/qlobCn21wTLFDgzJ4fgj4/ZqP+TAp8UteEZIz6DPWzCm IZk8NJwd5jmpptJjacnwmgGUK/fNBylFuiRicxVQzvXhQjHRo47yLQAmJ mFgxeuL7XdEOJtNd1l5egSc1t1m+fqTcqr8Jmz9OWVF5HWyq0cCsknSVB FF0wQd5HP3xgMZmwdgSy2Vv9lej/udVgEMhmLr8cWOvnXxwCSMjaFSdcA w==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="368407274" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="368407274" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2022 02:14:26 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734119246" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734119246" 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:23 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , Hammer Hsieh , linux-kernel@vger.kernel.org Cc: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= Subject: [PATCH 36/44] serial: sunplus-uart: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:43 +0300 Message-Id: <20221019091151.6692-37-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=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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?1747111986980187085?= X-GMAIL-MSGID: =?utf-8?q?1747111986980187085?= Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/sunplus-uart.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/tty/serial/sunplus-uart.c b/drivers/tty/serial/sunplus-uart.c index 7afe61a0e72e..727942c43c45 100644 --- a/drivers/tty/serial/sunplus-uart.c +++ b/drivers/tty/serial/sunplus-uart.c @@ -216,9 +216,7 @@ static void transmit_chars(struct uart_port *port) do { sp_uart_put_char(port, xmit->buf[xmit->tail]); - xmit->tail = (xmit->tail + 1) % UART_XMIT_SIZE; - port->icount.tx++; - + uart_xmit_advance(port, 1); if (uart_circ_empty(xmit)) break; } while (sunplus_tx_buf_not_full(port)); From patchwork Wed Oct 19 09:11:44 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: 5021 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp246058wrs; Wed, 19 Oct 2022 03:37:08 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4oH1ExT7HixrAn/x7fXbNtZiZCT+KIGrLoHxIJ5Cc+Wl6Ne51yxqVf5BlD1tF103Q4x+K6 X-Received: by 2002:a17:907:3c81:b0:77a:327a:815f with SMTP id gl1-20020a1709073c8100b0077a327a815fmr6241483ejc.422.1666175828144; Wed, 19 Oct 2022 03:37:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666175828; cv=none; d=google.com; s=arc-20160816; b=E/SL0G6lf1hNuGpFcp6r7e4j4WC0MSLMQflG8/lWY0lv9BSuP4d0qHijOSWz9GT3Ux uBhC/+O++Ce2VgJGSMTdE17FR10rWV/7wXa8EW+N5dThXXQmYsP6TI1KtcgcnjwS4JFC Q1ymhNCJoo9bBhrRAHaBX/x8KyP7Ssz7v5pUH29hLRl9ElVKknxEUQePjmq7ROJfZJlg kgYWlTra0oOl8uZnGOGvovNWaLlcQdIt0qu0sLiPYKpKcSJddfKb914ZpJIg7/7f4MpI hhgVN+cwnaAHHkt+EgP6FU1/6YeoadiEsnG3/TYz8SVjnWUvQgIsp4roC//LPWvmJYld sc2A== 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=5oiDndZbeMRUjpZfSxUM7uTZnhV+upm9cxIXeDqBYhk=; b=TRfZweyKoHCZS7O/qTwO/e5v0PPVYTtB2Yit1qB+u8YyCJ8D/JNZ75uFANrEtcJ07x 2w4T8NIf2dt5rQem78x3Hh9L4C462wrlI5XK69Jv/SlcJD4AOqMHeRTd69Y2beA2Md+O wGAU67HK2z7Ow/zEFPNAY6hmdYz/P5Bz/A4g3JNlOoR4HWwag0b8XWL3N7yRDVmArLWZ ry38kgLVtOqwvYmWNUfeob1luYYER9pQvTUSFDpxD1CLYa5VhwwGYRzf4nddBUDcxHRd k3lGenWe9Jo/3WFxJtQjRM+MX46+o35W/Qy4oBzh1oRU0VvhZ30YXRjlKppFo6zHYD0o PwAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=iSHRQhnc; 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 dn16-20020a17090794d000b00730870cb4b6si10942221ejc.621.2022.10.19.03.36.42; Wed, 19 Oct 2022 03:37:08 -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=iSHRQhnc; 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 S231549AbiJSKcO (ORCPT + 99 others); Wed, 19 Oct 2022 06:32:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229841AbiJSKbg (ORCPT ); Wed, 19 Oct 2022 06:31:36 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B08DBF01B7; Wed, 19 Oct 2022 03:10:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666174228; x=1697710228; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Uap1H5nY8QhFUnLKuQGsMA8Ds5ys9SXkfxi++zVNE9A=; b=iSHRQhncCe/alRTg0MGmpt0EZLSKGBYOD6Iwas3YExkNeO/ObPzsBYYe 8xEktxeXw1sOi2bEkh3GxWOtnK5SUj9ARyWQalEz5opgHJKVuehXRHVVB Zj4dDULjmqYIQlcoTBwfI3jgE098YlpoTgK80h632soecMBSPCPOIE57e 2Hz9/j4nREaDPoFEszSH1QADlpSUOk4jgv76MGRBxivfZD+JzYQxY1j+I hXxGKIdg7jhoVLcIHoWIJs6qWKm1mjjTQ2mm5EQlHLAnsMdHUKrczAHck 3nkNFNxJolOBl5jGRevZvW8JuvkiSZ4EBx+Rt/BnivUEsvnKsaFdd4BbM A==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="368407296" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="368407296" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2022 02:14:29 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734119270" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734119270" 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:26 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , "David S. Miller" , sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= Subject: [PATCH 37/44] serial: sunsab: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:44 +0300 Message-Id: <20221019091151.6692-38-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=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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?1747111985304291333?= X-GMAIL-MSGID: =?utf-8?q?1747111985304291333?= Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/sunsab.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/sunsab.c b/drivers/tty/serial/sunsab.c index 99608b2a2b74..94db67f21abf 100644 --- a/drivers/tty/serial/sunsab.c +++ b/drivers/tty/serial/sunsab.c @@ -266,8 +266,7 @@ static void transmit_chars(struct uart_sunsab_port *up, for (i = 0; i < up->port.fifosize; i++) { writeb(xmit->buf[xmit->tail], &up->regs->w.xfifo[i]); - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); - up->port.icount.tx++; + uart_xmit_advance(&up->port, 1); if (uart_circ_empty(xmit)) break; } @@ -453,8 +452,7 @@ static void sunsab_start_tx(struct uart_port *port) for (i = 0; i < up->port.fifosize; i++) { writeb(xmit->buf[xmit->tail], &up->regs->w.xfifo[i]); - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); - up->port.icount.tx++; + uart_xmit_advance(&up->port, 1); if (uart_circ_empty(xmit)) break; } From patchwork Wed Oct 19 09:11:45 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: 5023 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp246074wrs; Wed, 19 Oct 2022 03:37:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5xBSMYZVhcExMwo4W/WoY5PF16PigVkEGHVEJFnXJ2QsGB37aF5v5U9PJ4l8zgGOTs6V0g X-Received: by 2002:a17:907:a429:b0:78d:b6bb:304f with SMTP id sg41-20020a170907a42900b0078db6bb304fmr5996241ejc.497.1666175830796; Wed, 19 Oct 2022 03:37:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666175830; cv=none; d=google.com; s=arc-20160816; b=vanY0cDEUtytKRW6XUSypFuc7I2UNyodvJT8saEBt2N9jN1cRtN0pkTX3YapsKrfcg uwJ+mRYIyjrli5lToH5KxivblC30CFv/JmsRyqPuSwHAdtwkfz8ov/EbEJaOFIo0gcTE +PB6go+5CcnuQF+ASHng7rI5bUHpPp1meAFVR5FkVS8mi1wntkFFzd3WhgqnhbkdEgAU p0Y/eo4tDH4y3iVE1AiQYYTKUd/Rcm2Nx24T9YaOQD1UlZl0HLbFT38gdH6oxgaDhKR3 fV6t2dzyrfOwyqz1kIN3a3jfCyTwxUbD1VyTuyPpdkTVrmyCGUdzyO4g/LSeVFh2V7PT IDYA== 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=GAKoLDQhmAtnat9UhqYQKLc4GZKK9TLCtTw/ReAqgsY=; b=zDZMjWlaTcdEp1ZKPUSpaTrrLZ2MHJ9xweMSkjVrsbeoI/jnWnVnmDO4Oc6Etpyz7B kCIoAIImMNAJyuxD6sA3C69JGv/XGiFsS+s0Oc3BFVS5x73yZXnEqPs69EeG5CFW9MZe 9LVAwO+Ws3IDEGsetGq/Sqz++IGn3bfm8e7QSYeKbS0LC+xD2O0nHhQImOJvdBLQy1xg u+S/9GlODyDuUQzazgowYZt16zCL3R0w/eLUqZWwY3/xqyg7/DgfO6mxr0NicE0L3ZAi 8brREdJ6bSsVgjVkeKTh6NHbQL6pmTw6gx4UkkZLClVi3VMlfezrQxtnrHKKM/IQd82K hPUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="giXqOo/N"; 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 y66-20020a50bb48000000b00458ea8cbfb2si13170214ede.505.2022.10.19.03.36.46; Wed, 19 Oct 2022 03:37:10 -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="giXqOo/N"; 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 S231559AbiJSKcS (ORCPT + 99 others); Wed, 19 Oct 2022 06:32:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229879AbiJSKbh (ORCPT ); Wed, 19 Oct 2022 06:31:37 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96982F88C3; Wed, 19 Oct 2022 03:10:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666174228; x=1697710228; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=rL6uaZX/hio+HSnDzkRczLQeC2Un6TqgLI2+Bpj/WVo=; b=giXqOo/N9PmVCPDOwe70L4S42V+aa3cqOuRX3R3HZ474evkb03+9ajC1 uADrXwKT6X6LjZzYx1hDIn1ic2CF1ySxa34SQA+TRkL5yV64Ipb9CfYVb Psm3MmoWnypkk3lFKoJyCVaA64f5Hix8pNBomIYUnt7CDNu65zCvxCiT9 TLlpWL63VuRixMGzPsAG3uuVnVbJEj9WHx1oZhPtq+FJckBg77dPt5fAL Ved0e1AC+RWJzOBSd1BNNYTCN90L+tOv3GtaVs4JN0lZ7T6Nq1NLbT/sG v0cFOYPfX1DuaDFpL+dWT+OQM/tfCVEO13yjdsv14A61CYU9NB+aeyw8n w==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="368407306" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="368407306" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2022 02:14:33 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734119283" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734119283" 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:30 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , "David S. Miller" , sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= Subject: [PATCH 38/44] serial: sunsu: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:45 +0300 Message-Id: <20221019091151.6692-39-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=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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?1747111988083829735?= X-GMAIL-MSGID: =?utf-8?q?1747111988083829735?= Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/sunsu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/serial/sunsu.c b/drivers/tty/serial/sunsu.c index 9ea7e567540d..fed052a0b931 100644 --- a/drivers/tty/serial/sunsu.c +++ b/drivers/tty/serial/sunsu.c @@ -417,8 +417,7 @@ static void transmit_chars(struct uart_sunsu_port *up) count = up->port.fifosize; do { serial_out(up, UART_TX, xmit->buf[xmit->tail]); - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); - up->port.icount.tx++; + uart_xmit_advance(&up->port, 1); if (uart_circ_empty(xmit)) break; } while (--count > 0); From patchwork Wed Oct 19 09:11:46 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: 5030 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp246483wrs; Wed, 19 Oct 2022 03:38:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM56j0x0xcAHj8nrnpxqWU8JMwOQMcot30gsOan8CcLoPA86xvAcNsmLaldBrdxYGTIubfgj X-Received: by 2002:a05:6402:2802:b0:43a:9098:55a0 with SMTP id h2-20020a056402280200b0043a909855a0mr6627891ede.179.1666175900250; Wed, 19 Oct 2022 03:38:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666175900; cv=none; d=google.com; s=arc-20160816; b=Yc4x9OKGDd8g2IALsVgbuVmXeZjDEHvvqb+OAJRjKsE3kZNvmbxQo0asTPUDVmuIu4 YF4AbIt58BwSqKHisqexEIO7mr+n7ovUVUahMlAYLjpbw1oCRhwoGpb0RGstRycXQFwy vPt1pVKTVoynyFcLsaB0C9ZKKgMoFra3fM9t2Fn9IdzhrZ65HOoVX4v3zT9Bc53RwJXW ArVVq77t2A691POngBqmFUc6vq7yuDrERVohrOtUFKLnwydEEayuxahH3CgxoFWR/rrk OpRKD/G7/rb+PnjtwAnQkHgde6lJ7Wb8l2WGT5TWc+ert+gEXlvPLUDgXMMRRZVj77yU 4gfg== 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=vc3yFZuDblk2DGU2mrtR/tcT3Qp95AAw2ndwqQtAGcg=; b=lTyD7LOq4AN2HxalWKc5jjn3Ykeh6c7IxVWPGTK/eZ4++gDB+NzSxjKVVAzd4TF2F8 UQsD2c6EgZrsAqAv9GF8zl2xQGTG+D95z8d+oQMkwpNL25oKQ5OEz/IJVdlgouKoMPHM RoEB8zlwQGQpQqN/Vts1Yp8OoBhlpNctCIKhDehTCF8jt0/1UcW1FOPhIj+WwDgiYmYH TA1eOJqRaNA5z0M3e7tcVWXYEER1am46UN/n3vvWCKzjjY+vvUHTooFNMWmXzDrWoVjX K4ssnfLkVDJcjxvVdIidMINT5rBaLnvVPYKkbAU/hiufoLtUf+SyvRppdVrFq2f7PPtd Wdsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="VBUn/5XI"; 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 sd42-20020a1709076e2a00b0078dcdbb3e87si14159193ejc.530.2022.10.19.03.37.55; Wed, 19 Oct 2022 03:38:20 -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="VBUn/5XI"; 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 S231129AbiJSKb6 (ORCPT + 99 others); Wed, 19 Oct 2022 06:31:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230491AbiJSKbb (ORCPT ); Wed, 19 Oct 2022 06:31:31 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06C3AF88DC; Wed, 19 Oct 2022 03:10:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666174229; x=1697710229; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=p42rOfnZnHhgK9jNlKlAN4axRBz7sA1fIz/kLTAn/VI=; b=VBUn/5XIyfNLtCoq+zx2C3lT6FkFTIIMVqwVUK56DfMuIOkiEUCXyKUX 62B4CHfGBK1MyDvlDHpmItWDdWM2949pZ5tqjM5B/Gw+MwSE6V0lXSL0i COtF7oa88OctW35Rn6M8iEnDcPOKnh55+zR1mi+NFatQfxqdHG+Me22kJ qlt0jlyp86pOcdX3K7484Cqwqp6BaRtcnJJvc02qRLR2dFdYfCINwvwKU F2/JjbKMn7PXYgIoi0oyIAVlzyng733GXr90CnAJ1suxA+BlSyJv6OyKN sGwjklfoUnqJI6CxDnmLkD9tAG/MhYESlZE8vPgtX4zz0veCGAD7n3sbN Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="368407318" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="368407318" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2022 02:14:41 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734119300" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734119300" 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:34 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , "David S. Miller" , sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= Subject: [PATCH 39/44] serial: sunzilog: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:46 +0300 Message-Id: <20221019091151.6692-40-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=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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?1747112061121454953?= X-GMAIL-MSGID: =?utf-8?q?1747112061121454953?= Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/sunzilog.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/sunzilog.c b/drivers/tty/serial/sunzilog.c index 87425290687d..ccb809216e94 100644 --- a/drivers/tty/serial/sunzilog.c +++ b/drivers/tty/serial/sunzilog.c @@ -508,8 +508,7 @@ static void sunzilog_transmit_chars(struct uart_sunzilog_port *up, ZSDELAY(); ZS_WSYNC(channel); - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); - up->port.icount.tx++; + uart_xmit_advance(&up->port, 1); if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) uart_write_wakeup(&up->port); @@ -709,8 +708,7 @@ static void sunzilog_start_tx(struct uart_port *port) ZSDELAY(); ZS_WSYNC(channel); - 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) uart_write_wakeup(&up->port); From patchwork Wed Oct 19 09:11:47 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: 4987 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp227266wrs; Wed, 19 Oct 2022 02:48:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6r0wID4Mq5orQUoTMJ/CFKT8acGp0GavXr58VjGEkN+pxTFpMsDlHsQMYGIz6Er+OyAAE2 X-Received: by 2002:a17:90b:4a4d:b0:20d:4dc7:fa72 with SMTP id lb13-20020a17090b4a4d00b0020d4dc7fa72mr8480354pjb.86.1666172894260; Wed, 19 Oct 2022 02:48:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666172894; cv=none; d=google.com; s=arc-20160816; b=SpxneR9lD5U3onUIB8halUcjuKILtPOhCvEp4fbfwY5WVt7JoupIAxcdilMJTEFQDn 4noWZ05gUiED+N0iNqqWyOXkzFrde6XzUOpXNGxgTpf7jGMAPLR+LYWhPsUPhG3FYnuN n/g2KxJoudT9ZH5+rqZRKKlSaxzM0l534a0HI2uBcQJUNgZIZ7zHSZ1V+f09FoeyI/MA Lal+EZ1ZPsRWG5SXPuuKGQALH14qOOq81QFyR0QOlTi9wEwX07Xnyxj2WBrMNVjFC7Bt 1k3XMoRYljThBJTuEjBoUw5DASwv4eqk3L0eAwB4P4p6W09IAzD6CjKITujtRvYdUv02 MdQg== 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=x2Lt2C3tXJmP0CzAZTsHw5eXx9wvxW6MevBgge8Hh54=; b=upzrmqMIxUd/32rcFkG1tFSCCXij8Z9YcfFGIuh7jLf9TVAblP0ETKEOS36ET2o5Zf mKRo+KK2YsjNhGrCuB1aY9YIooQLFcax68ZxVySiTMFlVwRhVoVX9+aRMkTiqSJ3ReTV LJ1mYn8gMhxAChcxc4Dlz/gQfaPRrhakau2d5vpskoJUM0XNLxHlIyBSf+vLoSemR3D8 6G4IDNAVZhLYwU7haznnU320KkIiVKjyPuFkQ0IysboWBL+3sSJ3ub2o6ibG9Ju8G+hA HdRnDLlkNDl0kLKxFxkGP/sUgcCD78SGlp2sgEG0vJggxC7NZqNvHJdWdnJTMwwkoy/M hrMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ELAHNHWy; 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 g9-20020a17090a9b8900b0020ac8a8f40dsi16125748pjp.81.2022.10.19.02.48.00; Wed, 19 Oct 2022 02:48:14 -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=ELAHNHWy; 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 S234625AbiJSJov (ORCPT + 99 others); Wed, 19 Oct 2022 05:44:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234820AbiJSJl0 (ORCPT ); Wed, 19 Oct 2022 05:41:26 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6593CD18DF; Wed, 19 Oct 2022 02:18:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666171089; x=1697707089; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=N8gWHCU+8cusGblZ4FloORP2XpvV18UIJycDBAa/ghg=; b=ELAHNHWyqjyO/2ovRCL09Vb0Tw189vGC7vbCiugvTuQklBpc+k1T9LFC 6PV92LvS6WD4ZbboW0Hogmg04cjHEeEG7URlRx399vJxYj3k3YhAHEQ9+ ELwNP0wDVZzFz2FerprmEEIIDTprNZhzlk/3DIFC1uSuuKFabPQ4MWyfC 7cZyCTNZo8jQPUmYWs+c/IH+ONd/eLFtH/gA8lFFticIOiK2cjRAr1Ult MsBq0TNwjGgiTjnhWSDnhCZbcz3p6To4ub/ab6sJZTw3qgq9KOayCf711 dyit0OsucXLTkmt17u12mkOa6eaWEjKXV7FRim/8rcgJ1UPA9dt8APxHc A==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="289672415" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="289672415" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2022 02:14:40 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734119314" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734119314" 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:37 -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 40/44] serial: timbuart: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:47 +0300 Message-Id: <20221019091151.6692-41-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=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,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?1747108908907715405?= X-GMAIL-MSGID: =?utf-8?q?1747108908907715405?= Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/timbuart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/serial/timbuart.c b/drivers/tty/serial/timbuart.c index bb19ed012def..0859394a78cd 100644 --- a/drivers/tty/serial/timbuart.c +++ b/drivers/tty/serial/timbuart.c @@ -101,8 +101,7 @@ static void timbuart_tx_chars(struct uart_port *port) !uart_circ_empty(xmit)) { iowrite8(xmit->buf[xmit->tail], port->membase + TIMBUART_TXFIFO); - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); - port->icount.tx++; + uart_xmit_advance(port, 1); } dev_dbg(port->dev, From patchwork Wed Oct 19 09:11:48 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: 5227 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp266020wrs; Wed, 19 Oct 2022 04:23:41 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5zZySUokqQ/QXXaaJBPQbDnoeWkUulIZg9Am+o0LBH1p9C8EpaZGw593bYTMGLOnYQ/I0l X-Received: by 2002:a05:6a00:ac6:b0:530:3197:48b6 with SMTP id c6-20020a056a000ac600b00530319748b6mr7893066pfl.80.1666178610599; Wed, 19 Oct 2022 04:23:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666178610; cv=none; d=google.com; s=arc-20160816; b=Ff4XyPQNojBOkwQZSFhPAipGMeQmB0InGPmoFyp+pa569kIQsVZzMDJ/BABeatMyvl v9lMDvkEr4RO/FNArKaDM4sEgAJo7NmqHRGiTDxayRxrtjKGT4RyRB2JG/5nb1mDjZFb KYAFQageNSj9crk3cQ0LSW5TrmFFpYv5/b6DFzUlYzMMllaQ2rcwTBEYHFegiDAZO89R a5DSMeOA3YbrcAsQUpF9+DwDyUqEg8JADSEb4uDN2ffL68ubQx7Q2wMhuyRLBV92eENT JC+Zbs9JSK4rmhPuowekbUFKXHhdK7l8uaXqqWK5/4vvM2EVTFlQ3DdmhJiWpR80APDK oQlw== 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=An46e1USRvHSZX7JtNF7savQVfineTk1Z3NO90Tylwo=; b=eYyxnqFBWHF/3kLjlbfJhk5wzZ1wa4A7s6orcknHNok0NcvB1GrZn3/igOuTNUn+sX 8AchgIrxMmgMWPUQYCS6e8hLgg6bjoaxMeCLQhi/nTtIcLCpstB78b7riBYOhYI8aMtI 8z3sk6ICioKPRabAeUNkpeNHWb/fw2orpGVQk70rcn69oKO+JF1NjvK8Uuz3kLso2hXe aKXgiZLDQyQWbXXMju8Z3VfsCaRqz3PwP1nKhnTP/E9nVauHoGPCcEkKNdSVtZwtXT+5 setWD/ioiDbijPb5rT91CzPhjdtomKQhLJ3x/cnGUHJpeMD1EIHZMIb6nTz0libA+9sp ZjEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=G2691YPD; 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 y35-20020a056a00182300b0053641d594b2si18771235pfa.40.2022.10.19.04.23.17; Wed, 19 Oct 2022 04:23:30 -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=G2691YPD; 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 S231175AbiJSLQc (ORCPT + 99 others); Wed, 19 Oct 2022 07:16:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230064AbiJSLNu (ORCPT ); Wed, 19 Oct 2022 07:13:50 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2925B1849BF; Wed, 19 Oct 2022 03:41:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666176074; x=1697712074; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2fcH1RckItYB1DaGqrWXRre2uW8qfw9sV3lZLqMJ7X8=; b=G2691YPDasMFCMSvlZSpdjJ/xrwYnFcNF0uZydlaYeO1SSiIp0CGOdD2 ElrETi/VnJiJHh6cvncLdcuIGlITtNe9K8EjJUDXKa3qfbNIey8chZMfq Z4XRXOdmb0zlfGR3aYwzH9ZtY2wejwTMLlxEPIRszxSH/rMXbdnrCYNDv MJZTEhY6mJjB9kIgLTVIETAfvyoizGk6dRtZ2G6xdkdu81Q3pTOx8c8gB MFqssdO1Sh48wJaSXdGl/sWXLECQ8kTn0wfDbAGcs8aMh2avSCThr375C lO/RS+rAM004maMn/JLhTGlFAGPFJINXHr2ADQ+EtAOpYrh73+C19jIMl Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="370573944" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="370573944" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2022 02:14:44 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734119331" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734119331" 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:40 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , Peter Korsgaard , linux-kernel@vger.kernel.org Cc: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= Subject: [PATCH 41/44] serial: uartlite: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:48 +0300 Message-Id: <20221019091151.6692-42-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=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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?1747114902394154248?= X-GMAIL-MSGID: =?utf-8?q?1747114902394154248?= Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/uartlite.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/serial/uartlite.c b/drivers/tty/serial/uartlite.c index eca41ac5477c..94584e54ebbe 100644 --- a/drivers/tty/serial/uartlite.c +++ b/drivers/tty/serial/uartlite.c @@ -203,8 +203,7 @@ static int ulite_transmit(struct uart_port *port, int stat) return 0; uart_out32(xmit->buf[xmit->tail], ULITE_TX, port); - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE-1); - port->icount.tx++; + uart_xmit_advance(port, 1); /* wake up */ if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) From patchwork Wed Oct 19 09:11:49 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: 5232 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp266499wrs; Wed, 19 Oct 2022 04:24:54 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4TeOvnxfafNyBoV6Lm0wBZPj4MbPEQP6gVGCjX0Plj71Kv8FY7b4oP42v0K3BLhe1CKMGk X-Received: by 2002:aa7:8d57:0:b0:562:b63c:c2ba with SMTP id s23-20020aa78d57000000b00562b63cc2bamr8169482pfe.29.1666178694328; Wed, 19 Oct 2022 04:24:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666178694; cv=none; d=google.com; s=arc-20160816; b=krQJSzrLxGNv1xQOtT6Z8LbmgDZ8QMuNHoMQFATwTZdzDQkGB3nLSRWdygRGOCsZzZ 1eC3GKZ3wXIcCLX6XVocqGWeed9FgexaAtjFYvHQ9q7mS2tlcD3gd1ZMlqr8eEhIhV9o COukSnf/ojnQPtbBIPHvbK0Tmz9eKutclRN7OMARF2lL3ciHY2WypFAQL2nB4w6MRVht TrWAV8ekXP5srw7BBXTYi4Erju7rkKIj8oCMKt1QQAnruh2Ec1Uxx7lE1XFjmrnTn8+P s9RZ3V6uo+KBuv1nfIxK3EL6F2SfuTPvYrl0doa55C0oRf2f1G1+9hd/qrz1hsFLuhyz y/jg== 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=AiPDD8dBJkGTLF4p2S6ruzXFPpWJv0+oIR1u/zKC6fQ=; b=k+n67itpWPklBGB5xyp8W5uMHRJ0drKLcNMKmVlVBXx/Mg1gMWTJMwMfR8yKN27ZMX UpeG4A1GPRJziK92nbgeM91MVGz4uFp0kKtPG0oGyzWXoMeXwq4qcDG/b/qYhzGs817A hbszmIUseiRpEBLzBDsbLr0iH9nv8d7DEy1R0HxfO4DGjgQr/qZ12yovqIvD28HL8Mvw Z2U79WY5mNe8q3Uo2N5ia2OOPFdT/ZzmlV12Fr4238PPN1ZxjshjQZ102qVvtXN8Pr0N 09wJ2y5J15FynheWN0vr7OXcNtxKvbAYfnRaFQmQYVyvam4m27HkMfMk3tsOZ/EVcsew tOMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="W/Of7CV0"; 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 oj15-20020a17090b4d8f00b001f335a72172si27630667pjb.62.2022.10.19.04.24.41; Wed, 19 Oct 2022 04:24:54 -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="W/Of7CV0"; 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 S231235AbiJSLQi (ORCPT + 99 others); Wed, 19 Oct 2022 07:16:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232335AbiJSLN6 (ORCPT ); Wed, 19 Oct 2022 07:13:58 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 292BA185400; Wed, 19 Oct 2022 03:41:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666176074; x=1697712074; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=B13YA0WwjAgxh8IASNKkr+KfcFMYjEluxjSu647UO1s=; b=W/Of7CV0Bo4HdMgm6UHLg/CiwngaaSiTMkv/x5BZJCD7KiGzcfLWXx9U 2L7ZYVoKuapPo/oyy6O9qr9Dil2LDGT5ux5IinXTkk6VM7ESf8qZrPJkt PqqbOrTMXTLWD6ffK2PIpqNMfQCdD3LvNnDw2Xmba9Vqxw/ZH4BFhLguU GoTsO1wA/+WJupchaQa6KNFdAuOJWHoethMtf5couJdhCCwooNcNdY4Qt 88mFKDPSq3paF/IKNaawYr4KLMt1QQsD9avWBsuNgpMu1zAi+C0c1VrYH QeOHksqBhhDE12KhIVpgKCQJ6AzPDqX2Of8Pi4bdBPdJzEdiF4CqV1N1j g==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="370573956" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="370573956" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2022 02:14:47 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734119348" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734119348" 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:44 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , Timur Tabi , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Cc: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= Subject: [PATCH 42/44] serial: ucc_uart: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:49 +0300 Message-Id: <20221019091151.6692-43-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=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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?1747114990765416299?= X-GMAIL-MSGID: =?utf-8?q?1747114990765416299?= Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/ucc_uart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/serial/ucc_uart.c b/drivers/tty/serial/ucc_uart.c index 82cf14dd3d43..b09b6496ee3e 100644 --- a/drivers/tty/serial/ucc_uart.c +++ b/drivers/tty/serial/ucc_uart.c @@ -372,8 +372,7 @@ static int qe_uart_tx_pump(struct uart_qe_port *qe_port) p = qe2cpu_addr(be32_to_cpu(bdp->buf), qe_port); while (count < qe_port->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; 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: 5229 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp266120wrs; Wed, 19 Oct 2022 04:23:56 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6Gutt+G+kAAfy1nEf6LwOQR+oy6pXQsO1hAMMI5DjvbSOeuHtVpD+h1UVzoDbv5IZijrfQ X-Received: by 2002:a05:6402:2074:b0:458:ad26:d5c2 with SMTP id bd20-20020a056402207400b00458ad26d5c2mr7233732edb.332.1666178636254; Wed, 19 Oct 2022 04:23:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666178636; cv=none; d=google.com; s=arc-20160816; b=tsa0awdsvlTct6sWxOqNNQkfg45zdIYTDVLQhz76qCN+cFgUDQZAw+ng4ekI3Z5VNW m3l+NLfDd0A9Cwwmuel5yX02uAeacBx5nmR5KLMOyP4UQp7zV38MUvugaNxkNxWkNBG5 v9UG8QF/77VU747lDZrXgGNanTLZDykIsXrShspFbJfkDbJbEFzzx5vUHTSdflTdD4iv k/6TGuh9hsXpuol2X4jleTBEJJJPqiNvG0GDm8nBQQKH4YOfsU217Rf5+5TwnbWi7+PH yI4nfRB9NXVgQDuBwsf1X/kvjEdcS8ZME4hfiVCk+XYB9y8PGb2Sl8anXcA9E/tq52sK Nu5w== 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=/KLmE4CMmyb0blzrsL7h6o4OKbhfKL5VqFnDaidzh3M=; b=fXTMkxRDwv+2aJ2Gdh7tYdwl724KPurMRwea4Zot6jlHxRDocv8eZFFNCT0HvB+zI4 CNIY7RMDR4q0c54ITy8Q7xLdXafHAcefVn9kNGCWX91+JT3fjrNMD6y2JjvV2ZgX7pQP qx0p0lPpj1aEuWTNKGSXwac1yCfRDY7ux0W/HG0xtKFqBO0RiGbtvC44ZVA1K8iizmGO buBVko7UUGXnyxLtEwgf5RMXN+N1mjR+gi2NX3wjeqzE3RVCZ92XtR/sLCgYmPcVhcJR rSky65Dfh+bfAsqU5glcBYcdxMYyxNNLP9RTh6G27OOlacRB1KPD3qJli2Cd279BiMIM qIVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=MDQuY+5Z; 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 hb8-20020a170907160800b0078239e3f846si15837359ejc.1.2022.10.19.04.23.31; Wed, 19 Oct 2022 04:23:56 -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=MDQuY+5Z; 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 S230020AbiJSLQT (ORCPT + 99 others); Wed, 19 Oct 2022 07:16:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232086AbiJSLNr (ORCPT ); Wed, 19 Oct 2022 07:13:47 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 802A91849A4; Wed, 19 Oct 2022 03:41:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666176077; x=1697712077; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Vdv0VnfyYwVYEDCfG1dVBcwwKynwA8leh0TjEqYcP/I=; b=MDQuY+5Z0026YJUDu9smcGPNJONUIpXoDbbqztdsU9ZEamHJlnIXEH6B 8BrD6ETUNlGq1P1hGbTIbYhZyQyLSB7CuLqZhyrvdYc4EdYTsVj+5yUNu 1EhZiZmwtj32QW+aZxwdtpgU1yLV9wdT0Jm30yJJYGjU0KidxCiar+OX8 VME3vmx97W06HsUaHUbcebJCL7j8Cfg7K0jU7DmUkwxPz2Rgo24uFaLiF KJ33NB2cLjWQebV3pyopDUvGnQVeUgbT26XHPTEAsX/qB7mwOuOlTTz8Z 2U5iQGc6NrZh5ISp2CXlI/1PQAqYXXuLWWFoBhxXmmnqUuf7OakTkDsvb Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="370573974" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="370573974" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.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-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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?1747114929415604358?= X-GMAIL-MSGID: =?utf-8?q?1747114929415604358?= 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--; } From patchwork Wed Oct 19 09:11:51 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: 5231 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp266432wrs; Wed, 19 Oct 2022 04:24:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM40U80KOeQZYLdeAQMg3uSIC6NfhQsR5I3V9PrD3bnnJMYD1lo6V6OQNgxpnuCdYDeyGuJf X-Received: by 2002:a05:6a00:1596:b0:563:9a1a:b5b0 with SMTP id u22-20020a056a00159600b005639a1ab5b0mr7725501pfk.38.1666178682715; Wed, 19 Oct 2022 04:24:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666178682; cv=none; d=google.com; s=arc-20160816; b=M5Htli6s7jFpQINbbLuEQd87mQxBiUIm7Ie/FeRDaE6Exv7O1g8B8fmR0wfosSv0eN DdrD7Dy8Fubu8oZSQu1+22wj1kvv28ZRqncd8aHCZC3iD/bZvbKncFJAJ+CRgR35gSr3 19zXMc4vnUj3138j//EYdY7FRn8qWfi9OKaoZ3UhPrYNJP9QI/oukQkj3o5qaOHmGuft FCm8ZuL0x6tS4WyqaGilBQHcVwUQNCBK1yFux72ENAtvUqtClIZic/ir66rM8AQxvQem 3WHOQIaJeztypDREdC+zPNqohSpSwrcUJnRaIOLZKd+IRbYSi55nok/rjBvRbg3ph45M YnbA== 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=YWkJwDMIIcixLXdjpl0l1cO7R4YViuWCRDCgcjNPGlI=; b=f23RdZBd87nKmz9LzIIBeJJ5M8JcutvNNY+hnyaVR6rAi5udzgU2m0/gjtvV8aNhnl k95Y82O+snSIs8jdmLt2M5DDto6AbpMD8Yl0WyNWx2S3sTn7ql9u7I64Y3gnb0tnYmSw L3zeLzEpmliGWPd+EsbJTKQLP93x9Fjhohi5A0Iirbi3vWEEi5yRjEuSlc/kJTrmrxDE mzZeyZmyDHqo8l5jWIYsblLvijwK7L8xyds6IzJj5CMzzytmlMAmiGF8aiJjINP/CbFn CpTZoaN4HrzhdIMuxumHnbaH3oTixSFFEOctnCG0DKYVTPawNzW9PsfoRfQiYzLCZZx1 1ngQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RjxB5fZP; 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 j4-20020a170902da8400b0017f6557bf88si21735014plx.588.2022.10.19.04.24.29; Wed, 19 Oct 2022 04:24:42 -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=RjxB5fZP; 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 S230474AbiJSLQY (ORCPT + 99 others); Wed, 19 Oct 2022 07:16:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231669AbiJSLNv (ORCPT ); Wed, 19 Oct 2022 07:13:51 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 800301849A0; Wed, 19 Oct 2022 03:41:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666176077; x=1697712077; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0AaVgzWGPVmfu4N/bcNYFUky+Hw6vtDYUDcFc/orZuk=; b=RjxB5fZPXqY6VJTy8/QT2MtTiy9iqY5zlxEd+6bpGwt3YTewUIHV/MTY xlVy1MWAfY6nln06ES9Wb5kv7l19ASkoXQnB/28Ub2oCUqqmBD5oHuciC q7qTXsJ1Y1HxeuEwHKxeW3PT7GS0P79yWwgscwv7RyE9tReoCdp8ugUd4 aZAqfXcmkOEFvDXyo5Mx4PR+YKMCtjohy/7PBjBDRCBWQ0yw4ipqgJ1d2 8dBKU4H8phm7CpEAJnnpZ/1nrjKtC5FCNScOUtqOjZ7q8/pWRxzmEv9Y4 YUIQOV/wcG1eQpv5PxWY0E41joIqqK/pkCseyIuJR7WhtQj5NzADj63hq g==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="370573991" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="370573991" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2022 02:14:54 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="734119431" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="734119431" 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:51 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , "Maciej W. Rozycki" , linux-kernel@vger.kernel.org Cc: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= Subject: [PATCH 44/44] serial: zs: Use uart_xmit_advance() Date: Wed, 19 Oct 2022 12:11:51 +0300 Message-Id: <20221019091151.6692-45-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=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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?1747114978115247305?= X-GMAIL-MSGID: =?utf-8?q?1747114978115247305?= Take advantage of the new uart_xmit_advance() helper. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/zs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/serial/zs.c b/drivers/tty/serial/zs.c index 688db7d8b748..730c648e32ff 100644 --- a/drivers/tty/serial/zs.c +++ b/drivers/tty/serial/zs.c @@ -623,8 +623,7 @@ static void zs_raw_transmit_chars(struct zs_port *zport) /* Send char. */ write_zsdata(zport, xmit->buf[xmit->tail]); - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); - zport->port.icount.tx++; + uart_xmit_advance(&zport->port, 1); if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) uart_write_wakeup(&zport->port);