Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp2769263pxy; Sun, 25 Apr 2021 03:37:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyDHQqnmBn87R8CKWedFvcu5/8aqu+9PdOO6wdQtzfVD1CgJe66eMXpgqF9ojkISKK1z9oW X-Received: by 2002:a17:906:8288:: with SMTP id h8mr13120370ejx.75.1619347028574; Sun, 25 Apr 2021 03:37:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619347028; cv=none; d=google.com; s=arc-20160816; b=TFl3jVc5tDyhUeCzvfUEN2V99rvsfZmyOoQJP1iKkhl2/UAPlDN7GaKxqmg/J1Ljau vyMwKF04wI5Sv7WnH+ez+F7HyPeUqgqE4IWo+m73Em1MR8kND3BBCHDEqzuMcEp7zyiz qItQrPS2VeHheRHnL38ljs/83AMpxZ//12vu1zPQwErAGYsT6+2qKI+OLUX94YO+ACD8 8SbPLMwh7BIW5R67e190PV2Zg75HaZUMuZt1Nlnrbs81eU/v2+je9qN20HcjTc3G7jI0 ZRCxNHXLvH6wXfoXX9F6YQccA8nXiJ5vygzQEUDRCp6OJTSBg+tDTKK1k+6w8PN9GY5a papA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=Yoh4UO0Enzd4jI7QmT9orVQi36Fn72t3Ja42GoOlcSg=; b=iv6l3vqzgvBXLsNWL8scIgYEBlEbyaIjCbrFtHIbSWWTK6wGCg4/G0DNlJyCvdVI8i hMqgnTYikTrCpqnBVjVYPQ7zJ9drGuBo5kNjx26XQTwWuV7zt2+9gG5bKrF22X/QI3ms gec/oUVPqGWU059JxUMxZm6ZZSr5QWoXt8oco23wWzYSPE7XzjZE80Yq8KMfWrvqCr/D 6K9ZuwVVBE23cADv8f4xgrVSmG5mqv+nVMleJiENIvR78Uq25OTMy5/GHszzmA4Jkn6/ fNJSwb88Jwq8bQZbh6P1ivoYbdGq/aQRSsP7j5+j3miaMi1I2oXCp1SoDETyQu1K4UnG iCRg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hr29si9934545ejc.136.2021.04.25.03.36.45; Sun, 25 Apr 2021 03:37:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229913AbhDYKgM (ORCPT + 99 others); Sun, 25 Apr 2021 06:36:12 -0400 Received: from out30-57.freemail.mail.aliyun.com ([115.124.30.57]:48599 "EHLO out30-57.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229466AbhDYKgI (ORCPT ); Sun, 25 Apr 2021 06:36:08 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R191e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04395;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0UWgTzAH_1619346920; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0UWgTzAH_1619346920) by smtp.aliyun-inc.com(127.0.0.1); Sun, 25 Apr 2021 18:35:27 +0800 From: Jiapeng Chong To: pcnet32@frontier.com Cc: davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] pcnet32: Remove redundant variable prev_link and curr_link Date: Sun, 25 Apr 2021 18:35:18 +0800 Message-Id: <1619346918-49035-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Variable prev_link and curr_link is being assigned a value from a calculation however the variable is never read, so this redundant variable can be removed. Cleans up the following clang-analyzer warning: drivers/net/ethernet/amd/pcnet32.c:2857:4: warning: Value stored to 'prev_link' is never read [clang-analyzer-deadcode.DeadStores]. drivers/net/ethernet/amd/pcnet32.c:2856:4: warning: Value stored to 'curr_link' is never read [clang-analyzer-deadcode.DeadStores]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/net/ethernet/amd/pcnet32.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/amd/pcnet32.c b/drivers/net/ethernet/amd/pcnet32.c index f78daba..aa41250 100644 --- a/drivers/net/ethernet/amd/pcnet32.c +++ b/drivers/net/ethernet/amd/pcnet32.c @@ -2853,8 +2853,7 @@ static void pcnet32_check_media(struct net_device *dev, int verbose) netif_info(lp, link, dev, "link down\n"); } if (lp->phycount > 1) { - curr_link = pcnet32_check_otherphy(dev); - prev_link = 0; + pcnet32_check_otherphy(dev); } } else if (verbose || !prev_link) { netif_carrier_on(dev); -- 1.8.3.1