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 D6FDFC25B50 for ; Sat, 21 Jan 2023 15:40:18 +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=OGvyD9sL77T6KiY9NU8Mz4xEMLiIUJ3nJaKDQS1z2JY=; b=ZGTRu0VuWWLIdS K1kTiGM1XfhDY9LUSGkJOJ9hxs5h6yFDhr/9NGuaHllHvA1DQY8t5aPh+J7bQxlrpg4UK7rhOSEtT VWQAnrqdUtfaoSTG9LM35blvLGACVr3I7+GA7eQ0QaSMuZrrP60BspvPImOL4hVq62amhFD2N3QsG jBdjm+5j02evGNtOPk2mmB9YO4iAiMk/0IDKz+MkVZCEOYZtHln97El7mPNZxjIn2Azar5O4NKL1K 84SU+sxHemhAOAyOshPI+xYEECPDf+BKqVDE3u5qMT7GkHT7IPKz/UNv8yO9zhLlrseQSoPUeF4Wd f+IBGMxAKPFKe1oTDaiQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pJFxc-00E4uY-N6; Sat, 21 Jan 2023 15:39:17 +0000 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pJFva-00E43m-Oz for linux-arm-kernel@lists.infradead.org; Sat, 21 Jan 2023 15:37:12 +0000 Received: by mail-ej1-x632.google.com with SMTP id v6so20850121ejg.6 for ; Sat, 21 Jan 2023 07:37:03 -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=+fbiDWy8ZCeEEPo3XsRTUlzcMe3rsD7fkZwC6S0cFK0=; b=cUKloTLrSAChI4BCO0eWJaaZnNF/rZJTMroMFj45nPKm8Z9uKUW1hn2uoyH8x1dr/0 w1VlsQmfIg1o7b6OnBcQBF7ScdzssVX39T1BJyaW5vGhZUCVfuvtusjP2f2wsweYbWGU Q2kKYiAZXSvuGvoYgH/DJvfcVOUyqkvuSfov+dqbE9Pp07htHoqk0s6JrodKOdH7SXy3 2gN8DqLB/at+lhW8Mj8g65c2OTxTsoOL0D2/cnAlp5anyqC/pqMjObgXlrLcLNj1c1N+ +N6Uj0qqPAr1ZmEGr3RKQ0YJI+vUzOxRRiK5KECVbum/3RN02DXlumZ+givMw+S5gkXK aQcQ== 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=+fbiDWy8ZCeEEPo3XsRTUlzcMe3rsD7fkZwC6S0cFK0=; b=M8blKn4CTZ9GWHpVMk3ixEY2rK6W6LMakDCrmUTorS7c5djMTkWHJedwkNZfWOTqhM h+ql02+EJj0CnsQwLmaqAuWYtC3LgeigUc0qy4jAJ+u4I6Apma3qjBSWb8fO/vuMyVdq t1vZmgjAUQUEYF2QlUC9U64+7jMhvC+jFS0HMIJgA4p6xS1yKBoLJEvSaBbuH7zqo4zv G+VbsyYA7qU9xqyV5G7UEEGW/8z9eh/L1wfMi/PIBxOEcH/UtnHbDN3ejen7ydOQwMlC SbNeSveJ7yXJ4iQtuUU5U+1clTwSqEw3LmgHYLyomD/8D99hnNJb+jtf4hspCmZqJtqR rxTA== X-Gm-Message-State: AFqh2kqpF5LKGlpKaP9WsbHQ0jBCi6+OSRaAFl2nPrx4hAtGD9zA6MTp IzhzidDaZ8oQpkuxlQUwqPc= X-Google-Smtp-Source: AMrXdXu1qdNmIXsHJye5VL6FE77ShV+keQV6lziLd3CwABregAyifPuPk21u3ESwF1s20pxPZ5yisw== X-Received: by 2002:a17:906:b305:b0:86e:8b7b:adb9 with SMTP id n5-20020a170906b30500b0086e8b7badb9mr17195606ejz.34.1674315422275; Sat, 21 Jan 2023 07:37:02 -0800 (PST) Received: from osv.localdomain ([89.175.180.246]) by smtp.gmail.com with ESMTPSA id vc10-20020a170907d08a00b008717a377125sm8187030ejc.85.2023.01.21.07.37.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Jan 2023 07:37:01 -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=20Mo=C5=84?= , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Johan Hovold , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , Sherry Sun , linux-arm-kernel@lists.infradead.org, NXP Linux Team , Pengutronix Kernel Team , Sergey Organov Subject: [PATCH v1 7/7] serial: imx: refine local variables in rxint() Date: Sat, 21 Jan 2023 18:36:39 +0300 Message-Id: <20230121153639.15402-8-sorganov@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230121153639.15402-1-sorganov@gmail.com> References: <87bko4e65y.fsf@osv.gnss.ru> <20230121153639.15402-1-sorganov@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230121_073710_869432_BCD2C994 X-CRM114-Status: GOOD ( 12.88 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 488d8119562e..447b9060d9df 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -888,9 +888,8 @@ 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; - u32 usr2; + u32 usr2, rx; /* If we received something, check for 0xff flood */ usr2 = imx_uart_readl(sport, USR2); @@ -898,7 +897,7 @@ static irqreturn_t __imx_uart_rxint(int irq, void *dev_id) imx_uart_check_flood(sport, usr2); while ((rx = imx_uart_readl(sport, URXD0)) & URXD_CHARRDY) { - flg = TTY_NORMAL; + unsigned int flg = TTY_NORMAL; sport->port.icount.rx++; if (unlikely(rx & URXD_ERR)) { -- 2.30.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel