From patchwork Sat Jul 30 13:09:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 12932984 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 AAD83C04A68 for ; Sat, 30 Jul 2022 13:10:47 +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: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:In-Reply-To:References: List-Owner; bh=aqcfqi4m8VhkYGLwg9Szlx58zKMqLa3joGoLwyDN7YI=; b=H87++NCuE0jC5k OfcWJQmJFW1q/TESKcppi9deStd2wvmu/oPVmbGYzsBfy9EZ+qVIsPEzwws7sF4QrWXio3PTk/CrU oF8YbR0AnbvZhv5vcIM3jZM1z/cPwShaROmzk2II5WP9QyIC0a2iHszGgCFRpr/Vt3L+TJoBft4IV T8kzjqB/w5YMW9AM9o8sCC5rrl4Cxv4KBRYY05VsV2qwOxV8R00KaHjNEDcH+hCKCELrkWcLaKuTk P3qsx4MVak8M7kEYglrraZvhpWteLtPXzkTW8qA36P53fR26E/HeoQYJOgET2enu4aThCGP5pJ3pM dsg/mw+XXr5arhnQGklA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oHmDp-000oFK-4i; Sat, 30 Jul 2022 13:09:37 +0000 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oHmDi-000oAb-V6 for linux-arm-kernel@lists.infradead.org; Sat, 30 Jul 2022 13:09:35 +0000 Received: by mail-wm1-x334.google.com with SMTP id 8-20020a05600c024800b003a2fe343db1so3619340wmj.1 for ; Sat, 30 Jul 2022 06:09:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=7kagw9dls/BgBWBfIvyxUVIiQ8+9cpfChvpk4Mixp24=; b=X5kN8s41pxbwVzxYvhnojQZzQOY2OAe0kJWaI9I4Nr3Dp5Rpv9VjXOyW5CbXErckw5 eYtLaGA4x4Ibpgtz/s3VqhPRTuhff1+h4k0KrVWpsPMaeR0tuw+4uLZp4wN2MRmdJAli hSvEal/3aqpursRYrdNkVKZsgJpAN3s3pfFsAIHAnVDpdL4cq+bo9EmUh1eCcE4fBVVm sAIuGfaRd2mW/sM5m7J3LDxDSZ2i/wxX7ue/T6ycUZOqUB5rutBtX8mWeFVdtp3nEE2c r8h8EzS/2u+HdBSLwJGVj9XQ3+uu8PwBTBLOIoc1wX0XJrmOKJ3r0QgHSudAYz2jKpN+ pQhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=7kagw9dls/BgBWBfIvyxUVIiQ8+9cpfChvpk4Mixp24=; b=rKeHVzxyy8OO84z3ANMJjQudgydvlk6Nq+zomsfnDmP9MxNNE4srEH/PJ7iVf8WE82 ju/pzeC6doKwbN4jWPhLOhHmVS8/5Y32Z6NW4hlYFdZZEiLu4wCZiHuf3LmTR5E/KIUQ WmsyflB1r8SZzDwkfN8mePPbmaKkr6mvujtDDmtXfMEr5TNTLWhN7CICpt0vb0o3Dqfn mW+8wdQOJUrLuJqUBuiXqs9t2iJ/2XgeT1Yf0fok4IuX+kQysM1kVm8ehYcnhy+tcJH/ IZfHdn38zEgsOSDKRu53eF+wNTVLjfN37PVbvTXTmhpBcgYfcQAA1Gtvw0FJPDhXdDm+ W6/A== X-Gm-Message-State: AJIora/wxStyj+sr232RJsU0nZKlz6teJwB83LlUtZvRYMAiMAy34PhL cVz5/4nv4pEDqmGIPDnlPEg= X-Google-Smtp-Source: AGRyM1uP23E0LunR8ANvqJ2/vYfQxzFydvP8EbwxwCuzVZi+Q5/CO7PbbJmGoxJRM3Nv2QUwmiAfFg== X-Received: by 2002:a1c:4444:0:b0:3a2:fe56:e8ca with SMTP id r65-20020a1c4444000000b003a2fe56e8camr5255656wma.21.1659186566406; Sat, 30 Jul 2022 06:09:26 -0700 (PDT) Received: from localhost (cpc154979-craw9-2-0-cust193.16-3.cable.virginm.net. [80.193.200.194]) by smtp.gmail.com with ESMTPSA id r21-20020a05600c35d500b003a17ab4e7c8sm13076172wmq.39.2022.07.30.06.09.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Jul 2022 06:09:25 -0700 (PDT) From: Colin Ian King To: Jiri Slaby , Greg Kroah-Hartman , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , NXP Linux Team , linux-arm-kernel@lists.infradead.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] mxser: remove redundant assignment to hwid Date: Sat, 30 Jul 2022 14:09:25 +0100 Message-Id: <20220730130925.150018-1-colin.i.king@gmail.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220730_060931_038681_4CE23543 X-CRM114-Status: GOOD ( 14.06 ) 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 variable hwid is assigned a value but it is never read. The assignment is redundant and can be removed. Cleans up clang scan build warning: drivers/tty/mxser.c:401:7: warning: Although the value stored to 'hwid' is used in the enclosing expression, the value is never actually read from 'hwid' [deadcode.DeadStores] Signed-off-by: Colin Ian King Acked-by: Jiri Slaby --- drivers/tty/mxser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c index 70b982b2c6b2..600c71e5eebc 100644 --- a/drivers/tty/mxser.c +++ b/drivers/tty/mxser.c @@ -398,7 +398,7 @@ static enum mxser_must_hwid mxser_must_get_hwid(unsigned long io) oldmcr = inb(io + UART_MCR); outb(0, io + UART_MCR); mxser_set_must_xon1_value(io, 0x11); - if ((hwid = inb(io + UART_MCR)) != 0) { + if (inb(io + UART_MCR) != 0) { outb(oldmcr, io + UART_MCR); return MOXA_OTHER_UART; }