From patchwork Fri Jan 13 18:43:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sergey Organov X-Patchwork-Id: 13101493 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 3BC58C54EBD for ; Fri, 13 Jan 2023 18:45:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=oX1uLGMUgvOh+ml8k1vJxAYI4Rf417dAoSpbRwUEmTA=; b=LagcB4YpxdDpcL GZdN8/a3r5f9FiuxzmEWZhalYAIryjxbN9AK3N/1IjP9FlVAtk2jbkbIPWE7Gu5YxM1c3WLSInlvS vCsuaTogNaJ7QLofYbaZRwF3cwmLcEVa5a3JR5xqRG5xz7aBMcK3xnCya8y4pNHw9mN7BjupJhKPd pWrW2wGBit+PHM0yhi8Lqkq/92TlOzbnyEP9FK0c6bGhbuZw0XRfpW9Ae4hGmCc6ph8KTJN9Lc27x 9jDMtTZtpOhFXdRFOPIAWh4N2Mmgjn9QFoCkEA07cga7tnvlFdwEi82IEZ6M0wyVrVW/zHS61Kz79 9loHGdSK2tPqa3zg9kow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGP2Z-0045Vn-8V; Fri, 13 Jan 2023 18:44:36 +0000 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGP1p-0045IV-5y for linux-arm-kernel@lists.infradead.org; Fri, 13 Jan 2023 18:43:50 +0000 Received: by mail-lf1-x12e.google.com with SMTP id bp15so34301796lfb.13 for ; Fri, 13 Jan 2023 10:43:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TbM/0E+S8Ggk1+wMb510R+JTgrBTxf1YBPHLYLwKArg=; b=nLU3w/vxV1hxV25+86rkxBbQZK+BmAIZLXx6T+ellWNO3FpbmA8o5fuxCUB5Jm2Q8i Al6w8SjBakZcN4kSBLbvfyqqcOAaovr7977oM2iJf/w70U6/0ouACx7oyK3lCO7PRxf8 gbAHAhB9ArTotSJvbqp0c8cWqmQmrIkLIPMRC537cwMjD5fDc9NjIBa7AIsphaeFE93j XtPXFBAyySR9uCN3OK0Q8dPDY0q1UFH+YihyJpdE8YTUQYRZYUX/s4ZzA+3+bodw5XGB tMV9rXRYtuMflakV1THt7ZX9gW+YyBVbH4kekmi2U1ub9iWEEnPSoEssXhxS+QSm/1hk PXYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TbM/0E+S8Ggk1+wMb510R+JTgrBTxf1YBPHLYLwKArg=; b=jarCWGgSiv9rXIr8FHX50CmzZcNsQegQJhvBJr6D8KfrxpAJpeizsi0x5RqRV7NMkl kyCc0ikKo9KTbi6XMk2JMxkmmv6lLb+1go87L5A/g2qZqeKkHbDYMn5MDbB3I4r03s+u zAoguSlDBYOU0oc6qA+8wy9EmtG8zY/1DjJnMIcTY8yWV41cw6Sbhmb3ahOhRvUBqaCz p9cP8A4YvTH5uDJDorK0TuXIDAstvIUGuvyIxFzAZJogVwZ/N4fKTcQlbRd+9p1J3+bd Eu1WsJ8bHbHA2hEMJil/R/z1A6NbodjkKNE28SEjvDoRS3eayAjyc3m92eqIH5mEMrjM y0aQ== X-Gm-Message-State: AFqh2kr2RafaDKNXZE2AagYSfe2JH5e9NOHpwmZf+C5Axx73/+CwOxBa PCecu2eeOoa9HzSOibBR+fo= X-Google-Smtp-Source: AMrXdXsXqRwIW3RF1gdJ2+dC0m7vCsdhy4s6Ys42aIGjx4EcO93YP8XInQWa95Xzt9my4fC1xjEuRg== X-Received: by 2002:ac2:429a:0:b0:4b5:7aad:2690 with SMTP id m26-20020ac2429a000000b004b57aad2690mr19833381lfh.12.1673635427842; Fri, 13 Jan 2023 10:43:47 -0800 (PST) Received: from osv.localdomain ([89.175.180.246]) by smtp.gmail.com with ESMTPSA id o11-20020ac2434b000000b004cc9ddce3adsm1261439lfl.82.2023.01.13.10.43.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Jan 2023 10:43:47 -0800 (PST) From: Sergey Organov To: linux-serial@vger.kernel.org Cc: Fabio Estevam , Greg Kroah-Hartman , Jiri Slaby , Richard Genoud , Sascha Hauer , Shawn Guo , Tim Harvey , =?utf-8?q?Tomasz_Mo=C5=84?= , linux-arm-kernel@lists.infradead.org, NXP Linux Team , Pengutronix Kernel Team , Sergey Organov Subject: [PATCH 5/8] serial: imx: remove redundant USR2 read from FIFO reading loop Date: Fri, 13 Jan 2023 21:43:31 +0300 Message-Id: <20230113184334.287130-6-sorganov@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230113184334.287130-1-sorganov@gmail.com> References: <87bko4e65y.fsf@osv.gnss.ru> <20230113184334.287130-1-sorganov@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230113_104349_262132_A5D07DEF X-CRM114-Status: GOOD ( 11.11 ) 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 There is no need to read USR2 twice at every loop iteration: get rid of the second read. Signed-off-by: Sergey Organov Reviewed-by: Ilpo Järvinen --- 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))