From patchwork Tue Jan 16 16:18:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 13520946 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 BCB52C47077 for ; Tue, 16 Jan 2024 16:19:21 +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=VYDzmMWrqzLVW2PtVY6UlEnpC8nMMczQbq8ihxxJ4NQ=; b=ofbC8BAApOi7eL 7/n7ry9xCUR5nupNnC4gwuJ+6Dk+ydJkNjm3u0chqcKkEjTpddcYAHddtYTTUMGTVZUmcPsNQ5bgw FgxRQHBQFFi5DXRiv+yCTv5DuWPpk+RYrZ88aZ2/2RNxXb2wQiDN3cIuS14FI9FtO2O0UdoYN7bvK J6AP8YmsZVORciwGSxBiqfYGhVZGYVfrusd9WtIpDOCh/NmiLrDBFUGewi1w41opFOJlMLO3UTnLz PLgfCfXVBlUGpl8dw73I3Wje4pVVUqClzPXn4AYKrknfJodGHU6jWJd34qvErqJ3s9imgQwnLOM3V aZikA41VMkGt7YyJc0nw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rPm9O-00Ca0J-22; Tue, 16 Jan 2024 16:18:54 +0000 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rPm9L-00CZyZ-2s for linux-arm-kernel@lists.infradead.org; Tue, 16 Jan 2024 16:18:53 +0000 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-3376f71fcbbso7875488f8f.1 for ; Tue, 16 Jan 2024 08:18:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705421929; x=1706026729; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=NMLlqCh2RRB/p799yyEGysccg2bTaRZ9dL/XaurTxmk=; b=BLIRat/vx+Pbj+UPO68E9V9kr6d2kvO8suhLlnhCxHX6FgePvwUWBofmMs9Ouau4lK 73+Vz1C8ZmPO00wwylJE+B7m6M1l3Gsm7NF5RNBUTVgTp+Z+gfwIpBwTQ8anjEsZl1Cq QXMd8cVZNjbI9C/ZjfSw3+lOZrxQCrlxjCWQO255K3p73SA94vMTbaaSGqizu9hm0ta+ Z/EswnwpYzXnZt69Kyc8gyYAqYJDEvhCSPTpPOj4vnsr4z8cKc284BSiqBzDjDOm0cfp kMdAxNSBrZyrWVTHWfhOvpeKhQNiee+GPOetw3ig2vF1I9YT6RpP/JWjmwoB/r4x0szX YXGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705421929; x=1706026729; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=NMLlqCh2RRB/p799yyEGysccg2bTaRZ9dL/XaurTxmk=; b=sWt5Qjxw0tV2X4tpd9jc/PLc06xzwDi74IdkLT4yj8l0zdqEI8US30aF1D26ZD2osH STUjwVfVE0e8qEEE7X/amqz18zi50NB6OqhTfPkD04rIRlkhgDeVvmQtyHodfHNPpjuv ag6TarZWwPBB04i/i4bEV+kK9j8zMsUKXJ7GjffStx9629AHcx98or1xPcOepAGZl79N QYVmNzW2PHO/WFuBYYJ0nj2wRVKJW7Sq1vM1v08R4+nFjwcth1h7VOJWWpvNwbj+V4Sg u4DWQxOIN+Jlc6c7SpOllnTdTN4I/twtSvdlJdri4M9LMqyG4k+O8dcSJ6U729RIgKiH kD8g== X-Gm-Message-State: AOJu0Ywf+oUr0dPvjKiiheUjaiRzYMDpkf2O1i6gHmwEbpPnucZTMY04 OajSOD0KdM7zMUeUeZMMGZc= X-Google-Smtp-Source: AGHT+IGg9HcrXY9tosc+ZAXKh6ex/tlbdaBnq5t7i6gTzwXtjgngrhgqq3KD6H+lk5AFWZXSNp++jg== X-Received: by 2002:a5d:6283:0:b0:337:4fa6:2306 with SMTP id k3-20020a5d6283000000b003374fa62306mr2602699wru.158.1705421928640; Tue, 16 Jan 2024 08:18:48 -0800 (PST) Received: from localhost (cpc154979-craw9-2-0-cust193.16-3.cable.virginm.net. [80.193.200.194]) by smtp.gmail.com with ESMTPSA id r1-20020adfce81000000b0033667867a66sm14956225wrn.101.2024.01.16.08.18.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 08:18:47 -0800 (PST) From: Colin Ian King To: "David S . Miller" , Eric Dumazet , Paolo Abeni , Lars Povlsen , Steen Hegelund , UNGLinuxDriver@microchip.com, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH][next] net: microchip: sparx5: remove redundant store to variable clk_hz Date: Tue, 16 Jan 2024 16:18:47 +0000 Message-Id: <20240116161847.2317011-1-colin.i.king@gmail.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240116_081851_930465_2AF6E77E X-CRM114-Status: GOOD ( 12.33 ) 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 store to clk_hz is redundant since clk_hz goes out of scope on the return. Fix this by replacing the *= operator with just * to remove the store back to clk_hz. Cleans up clang scan build warning: warning: Although the value stored to 'clk_hz' is used in the enclosing expression, the value is never actually read from 'clk_hz' [deadcode.DeadStores] Signed-off-by: Colin Ian King --- drivers/net/ethernet/microchip/sparx5/sparx5_sdlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_sdlb.c b/drivers/net/ethernet/microchip/sparx5/sparx5_sdlb.c index f5267218caeb..d8f49082dbe4 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_sdlb.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_sdlb.c @@ -31,7 +31,7 @@ int sparx5_sdlb_clk_hz_get(struct sparx5 *sparx5) clk_per_100ps = SPX5_CLK_PER_100PS_DEFAULT; clk_hz = (10 * 1000 * 1000) / clk_per_100ps; - return clk_hz *= 1000; + return clk_hz * 1000; } static int sparx5_sdlb_pup_interval_get(struct sparx5 *sparx5, u32 max_token,