From patchwork Fri Jan 13 18:43:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Organov X-Patchwork-Id: 13101496 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 C248EC54EBD for ; Fri, 13 Jan 2023 18:47:17 +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=vgG+Tt2oNXVdbUqStSnUlRtRC+g6kyLfxExO9pWhYKw=; b=Bb7sggVtF62Ek2 BUKWB40Un1Fsh4kXa9uBDai25KZy1JVqhuGTHybOaMepkX/QlLcAIKJQIfTTatamEUHgaZqfpVFE+ +PdYFoEnULJ/zwB3m7iLVXmLnW3XgrclZVDBv2X27i531R6h3WQRN0Fkw7Rc85+I6bos018ArKG6H +nPWmb2jszdwJHUmhzPAIlacITziROI3m/DEX4QuMHCh4iJMhV1GJScPO/pvKHGS7NQ36z9EmrfQX uYS7U5RFK8fNwSHA5egkJ7DuPGyClAj9wyIRojVYS9xKNAE+weuNc/IboQJNH0DioDdHvQgzTKYzz 0SCQQXK1GBr2oejBbTkA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGP3z-0046I9-JG; Fri, 13 Jan 2023 18:46:03 +0000 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGP1t-0045KD-RM for linux-arm-kernel@lists.infradead.org; Fri, 13 Jan 2023 18:43:55 +0000 Received: by mail-lf1-x134.google.com with SMTP id b3so34328409lfv.2 for ; Fri, 13 Jan 2023 10:43:53 -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=Yv7yYu+svGwVLgS8wyxzW693EiE4HtsBGRbigAy1MWs=; b=CP0QKj9lJa+BeUqD8mjzJAzZER4o144dB1FKlqUxhlS8kvXAxLI1Zx0PSlEwZxhtpz A1HItOSE1W9IH0lAmNpXNdj5aXi+Jz3NXTWPeqfhJqrykhBMM8HcMPiSM1INLAp0Dksu N+t/ZsVCAiUJmkuv2QdCm+8qC22E0xZg+HB2GCsdIRSpXNlinC16hWmm9gAJrhAlKQxU ay0wMGuX63vB0rXHiNQv230xrMgyLGz+vNUHCRkdUdbH1iO1v6VRAHsVN4G3RJhlpZGe 3Gs8pau5Tq1YiQ+/mYwyg4MfAS0eQd+TupXow1yPoP790TblXOt0ELIH1HOwtbarFusq IbJw== 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=Yv7yYu+svGwVLgS8wyxzW693EiE4HtsBGRbigAy1MWs=; b=NjgwUIXrIcIsF0JhtmT+0DLQvyTO+eteHMtAzr0bsu4S34lDortFz9t3HOqUdaHR1M hTHK8ILC8pbq0F7XQyRQkw8+dbXz7VBT5GWCqwZdw4PKIC4qfQyyA+8iN24ra3HNiCFj 44TdZ71UGvA5lbkkRzuu5zXd0QQQXCt73vIDK5ZgjSysu3aUZ47Sb74cXz+ovaKCsZXy zoOXAwmdN9URJfE/5VMjljMdeG+d2GgF8OkAFhg5yMdaYqWE+toT2ohhTKFzcYdeCOJ9 ps5cW8brCfVnpR78ye9DWGuHTzVTbvKdOPUjeRPFfwCdvwmhLdOKPrFzc/B2Qx5JCSwp HfhA== X-Gm-Message-State: AFqh2ko6cN3DCIhvRgoa1GrkhU6ijJ4o25FTHcTEIyQGIwyUNeogW7n1 nYQJFauLSRfaj8ZxJGzSOrQ= X-Google-Smtp-Source: AMrXdXvt1TMVuja3Y+Zq+MhsrzFa4qgMzz0RT70F2OE4C6YFu2bzKAp9gyGVW7pWlLPpu2ApvjCcEA== X-Received: by 2002:a05:6512:1597:b0:4b6:f4bb:e53f with SMTP id bp23-20020a056512159700b004b6f4bbe53fmr26621541lfb.60.1673635432565; Fri, 13 Jan 2023 10:43:52 -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.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Jan 2023 10:43:52 -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 8/8] serial: imx: refine local variables in rxint() Date: Fri, 13 Jan 2023 21:43:34 +0300 Message-Id: <20230113184334.287130-9-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_104353_947451_499DFA6D X-CRM114-Status: GOOD ( 12.97 ) 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 The 'rx' is chip register, similar to 'usr2', so let it be of 'u32' type as well. Move 'flg' to be FIFO read loop local as it's not used outside. Signed-off-by: Sergey Organov --- drivers/tty/serial/imx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index f4236e8995fa..45327ff6dd14 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -888,10 +888,9 @@ static void imx_uart_check_flood(struct imx_port *sport, u32 usr2) static irqreturn_t __imx_uart_rxint(int irq, void *dev_id) { struct imx_port *sport = dev_id; - unsigned int rx, flg; struct tty_port *port = &sport->port.state->port; typeof(sport->port.membase) membase = sport->port.membase; - u32 usr2; + u32 usr2, rx; /* If we received something, check for 0xff flood */ usr2 = readl(membase + USR2); @@ -899,7 +898,7 @@ static irqreturn_t __imx_uart_rxint(int irq, void *dev_id) imx_uart_check_flood(sport, usr2); while ((rx = readl(membase + URXD0)) & URXD_CHARRDY) { - flg = TTY_NORMAL; + unsigned int flg = TTY_NORMAL; sport->port.icount.rx++; if (unlikely(rx & URXD_ERR)) {