From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6CE07C46467 for ; Mon, 16 Jan 2023 10:50:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230035AbjAPKuu (ORCPT ); Mon, 16 Jan 2023 05:50:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230145AbjAPKun (ORCPT ); Mon, 16 Jan 2023 05:50:43 -0500 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D93E3196B1 for ; Mon, 16 Jan 2023 02:50:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673866242; x=1705402242; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=vJ1ctAqTpkAtaU0BcmAYC7zGY080YYDGaag4oLsWUfI=; b=O5jFtIIoQcUdUnOzYB7EMh/aO12diZLbFUEZ+ie2rMJ2Xs9vPvicCNNR XdbjTtjmWiD45dSTLtZI/b8+OpY8Sga6T4oW6SxL0L5KKUP/Dh+MlW4a5 i6w4qqv484xiWweA7ZQ2d4NpBJRh0j9XdyrwXztgo/EKy4xxJwsjKglk8 3NS+niSN/lKfQNs/iuy0Av7Z+SUphQ4t2HSE0DsFjNKMaf5tfRxciKskr 8R9Sdhn9hPG+hJI475EL7CD2GM9kR9ym3wgSOoKEEWXRSp8bXJiJ4FehG inWVvjZQj0UWGJjYx10tAHek6hZbduNZF2mAMZl4zWKRJ9Hu4VLwPmZzN w==; X-IronPort-AV: E=McAfee;i="6500,9779,10591"; a="326496162" X-IronPort-AV: E=Sophos;i="5.97,220,1669104000"; d="scan'208";a="326496162" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jan 2023 02:50:42 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10591"; a="658981009" X-IronPort-AV: E=Sophos;i="5.97,220,1669104000"; d="scan'208";a="658981009" Received: from xsanroma-mobl.ger.corp.intel.com ([10.252.39.155]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jan 2023 02:50:38 -0800 Date: Mon, 16 Jan 2023 12:50:35 +0200 (EET) From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?= To: Sergey Organov cc: linux-serial , Fabio Estevam , Greg Kroah-Hartman , Jiri Slaby , Richard Genoud , Sascha Hauer , Shawn Guo , Tim Harvey , =?ISO-8859-2?Q?Tomasz_Mo=F1?= , linux-arm-kernel@lists.infradead.org, NXP Linux Team , Pengutronix Kernel Team Subject: Re: [PATCH 5/8] serial: imx: remove redundant USR2 read from FIFO reading loop In-Reply-To: <20230113184334.287130-6-sorganov@gmail.com> Message-ID: References: <87bko4e65y.fsf@osv.gnss.ru> <20230113184334.287130-1-sorganov@gmail.com> <20230113184334.287130-6-sorganov@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-1919270866-1673866241=:1723" Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1919270866-1673866241=:1723 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8BIT On Fri, 13 Jan 2023, Sergey Organov wrote: > There is no need to read USR2 twice at every loop iteration: get rid of the > second read. > > Signed-off-by: Sergey Organov > --- > drivers/tty/serial/imx.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c > index b96b0edc7854..c44a7293c013 100644 > --- a/drivers/tty/serial/imx.c > +++ b/drivers/tty/serial/imx.c > @@ -904,7 +904,6 @@ static irqreturn_t __imx_uart_rxint(int irq, void *dev_id) > > rx = imx_uart_readl(sport, URXD0); > > - usr2 = imx_uart_readl(sport, USR2); > if (usr2 & USR2_BRCD) { > imx_uart_writel(sport, USR2_BRCD, USR2); > if (uart_handle_break(&sport->port)) > I was already wondering why it's read more than once. Reviewed-by: Ilpo Järvinen -- i. --8323329-1919270866-1673866241=:1723-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A06B6C54EBE for ; Mon, 16 Jan 2023 10:51:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:Message-ID:In-Reply-To:Subject:cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=tmLYTxnZrwUmPsGBhpSoR0aqK2+S49yjHmEfyIs1sN0=; b=0nGPg/Ib5vbrQprO8OzXawizox GrbOIWhqF1boIoeNoOZyFJZn0xjA2DOtHMYkayf+cXgZ+ualjm8hStDXfEfwvYd7A70abf1+8qqyM qro09HdNH9//8kIaxFkVhv/TjewpOrW0FAB+uyN4PmDPGp3ivepbJfGDhm6aoCp9hh3DwtEqGdfzb jCxod0Cvo9kA9CA7Zau+m8oFKcg6eQZuD9HNmppVKhzYowWqy8TY2tnCPg5AfyRn1ci8eU3fPIj4s 1JV3PeP614KhCftEWrbiQXHyBZp2EvvIuGuDOfNai5fjWxqlQWXO6G5ur+VLrFoziAmFC+TdBjpPu 9tr1it1Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pHN4i-009llQ-A5; Mon, 16 Jan 2023 10:50:48 +0000 Received: from mga03.intel.com ([134.134.136.65]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pHN4e-009ljE-3x for linux-arm-kernel@lists.infradead.org; Mon, 16 Jan 2023 10:50:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673866244; x=1705402244; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=vJ1ctAqTpkAtaU0BcmAYC7zGY080YYDGaag4oLsWUfI=; b=cYMZlYMQrOir691XllQSIwZvgsavxirnXZti6tC7hDs2KHZvnVxzcVNy mh2Hqs/gqoMsSg0w185Z182wqcR4/i5i/jKuNc2pX+e5qzvmxuDrTb7EU YZPgnKyuk13tj5b3be68XiO7pStgNJaD+NHjc8x6JUxyjys/vsZtTqWgV q5R2W0PQ/sJPayj9DQqs/QOu9v1UQfi49chOOyUNtFdv46/biosC+ksTQ DPvf07mw4+qQ8vh3+BY0LQ14fdec7IDmvLTuQmmdABYvg78dJS3MyrhyA LyJYKFoLEk1+5PqhBL3MEgqK6S0cAO1gfRNuZ9z7bwc4zPw1QK9CVjR4S w==; X-IronPort-AV: E=McAfee;i="6500,9779,10591"; a="326496164" X-IronPort-AV: E=Sophos;i="5.97,220,1669104000"; d="scan'208";a="326496164" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jan 2023 02:50:42 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10591"; a="658981009" X-IronPort-AV: E=Sophos;i="5.97,220,1669104000"; d="scan'208";a="658981009" Received: from xsanroma-mobl.ger.corp.intel.com ([10.252.39.155]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jan 2023 02:50:38 -0800 Date: Mon, 16 Jan 2023 12:50:35 +0200 (EET) From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?= To: Sergey Organov cc: linux-serial , Fabio Estevam , Greg Kroah-Hartman , Jiri Slaby , Richard Genoud , Sascha Hauer , Shawn Guo , Tim Harvey , =?ISO-8859-2?Q?Tomasz_Mo=F1?= , linux-arm-kernel@lists.infradead.org, NXP Linux Team , Pengutronix Kernel Team Subject: Re: [PATCH 5/8] serial: imx: remove redundant USR2 read from FIFO reading loop In-Reply-To: <20230113184334.287130-6-sorganov@gmail.com> Message-ID: References: <87bko4e65y.fsf@osv.gnss.ru> <20230113184334.287130-1-sorganov@gmail.com> <20230113184334.287130-6-sorganov@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-1919270866-1673866241=:1723" X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230116_025044_249049_E72419ED X-CRM114-Status: GOOD ( 15.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1919270866-1673866241=:1723 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8BIT On Fri, 13 Jan 2023, Sergey Organov wrote: > There is no need to read USR2 twice at every loop iteration: get rid of the > second read. > > Signed-off-by: Sergey Organov > --- > drivers/tty/serial/imx.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c > index b96b0edc7854..c44a7293c013 100644 > --- a/drivers/tty/serial/imx.c > +++ b/drivers/tty/serial/imx.c > @@ -904,7 +904,6 @@ static irqreturn_t __imx_uart_rxint(int irq, void *dev_id) > > rx = imx_uart_readl(sport, URXD0); > > - usr2 = imx_uart_readl(sport, USR2); > if (usr2 & USR2_BRCD) { > imx_uart_writel(sport, USR2_BRCD, USR2); > if (uart_handle_break(&sport->port)) > I was already wondering why it's read more than once. Reviewed-by: Ilpo Järvinen -- i. --8323329-1919270866-1673866241=:1723 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --8323329-1919270866-1673866241=:1723--