Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1279075pxy; Thu, 29 Apr 2021 03:43:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzCilyb70ToZiXtWzZRbc5brxTbN7sfDg6SUntrZwEiGHWyu0E+EZIsUjoRjIEWSXhMP/e X-Received: by 2002:a17:902:7c85:b029:ed:893d:ec7c with SMTP id y5-20020a1709027c85b02900ed893dec7cmr3494462pll.82.1619693005498; Thu, 29 Apr 2021 03:43:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619693005; cv=none; d=google.com; s=arc-20160816; b=gxqSmU/HygFlOkTSlQY44T3+0Q2661MY/QCBBQnb5S2hyN8aiHCtNtpREPU/1s2k43 sOpcxBqtid29f8q0m1Dx5ChPIfrM7aaxtUH+Nms6LaL8G2jv7X72znbi9LxXzNfKHc8y 1WBKKVWqUQd8vq8tYn3bAalVO3wyatNka5ct+0u02dSXaanKsYh1o0bJ9ArRvRWFXg1X f6DC4bT2oJgdnLe/7h3u/0NoGLHtb8n7UbQZ8lK27DV2/yO6w3rDYKcBT9vTgJ9nPARe E+Ebua54PvE/wYad2UCZvyR8WzC0MN2gaw+n6AzS0Z0P2WgfF+ZgCl59xlNi6kQERGyn s0eQ== 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=ZtkwZ0S8NacwHZ8YN01kKwrEQhyqD6ET/nY7dgmx0J4=; b=zy0p4HhLdvQQ5xZJJU8i0Enum/ijd2xibM190aAdCBy/6Np5jA4Cl2nR4wu+RNxivZ zz9QtGDDRDC6Iyc1WX+sLy27RhRKA8n0kGwnOo0OOgiMHJ51CKsscTomZzXEBckTdwKe HtmHwERrEYAzEygXKz7ZIR5YEz3MKIYIbDmDqjb8jqI+Wal+hmMRmbZPxR7QLFcPS8au HbTnbipO3C8tzUNjZJ7OaO7XgAG0tzJG1QeyFaR1P07uC8jZvXWwHwjr07YN7uMmRDg1 uscQ3OtE5/wiOn9Q2MMVqyzLi4SBbhAmRkLyMnhO1UHECzWJR/uOdSZhSa6nXulg8vZ6 dZ0g== 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 g17si3256993pge.164.2021.04.29.03.43.12; Thu, 29 Apr 2021 03:43:25 -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 S240398AbhD2KnN (ORCPT + 99 others); Thu, 29 Apr 2021 06:43:13 -0400 Received: from out30-42.freemail.mail.aliyun.com ([115.124.30.42]:56100 "EHLO out30-42.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232245AbhD2KnM (ORCPT ); Thu, 29 Apr 2021 06:43:12 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R281e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04423;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=10;SR=0;TI=SMTPD_---0UX9d.L0_1619692943; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0UX9d.L0_1619692943) by smtp.aliyun-inc.com(127.0.0.1); Thu, 29 Apr 2021 18:42:24 +0800 From: Yang Li To: dennis.dalessandro@cornelisnetworks.com Cc: mike.marciniszyn@cornelisnetworks.com, dledford@redhat.com, jgg@ziepe.ca, nathan@kernel.org, ndesaulniers@google.com, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Yang Li Subject: [PATCH] IB/qib: Remove redundant assignment to ret Date: Thu, 29 Apr 2021 18:42:20 +0800 Message-Id: <1619692940-104771-1-git-send-email-yang.lee@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 'ret' is set to zero but this value is never read as it is overwritten with a new value later on, hence it is a redundant assignment and can be removed Clean up the following clang-analyzer warning: drivers/infiniband/hw/qib/qib_sd7220.c:690:2: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores] Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/infiniband/hw/qib/qib_sd7220.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/infiniband/hw/qib/qib_sd7220.c b/drivers/infiniband/hw/qib/qib_sd7220.c index 4f4a09c..81b810d 100644 --- a/drivers/infiniband/hw/qib/qib_sd7220.c +++ b/drivers/infiniband/hw/qib/qib_sd7220.c @@ -687,7 +687,6 @@ static int qib_sd7220_reg_mod(struct qib_devdata *dd, int sdnum, u32 loc, spin_unlock_irqrestore(&dd->cspec->sdepb_lock, flags); return -1; } - ret = 0; for (tries = EPB_TRANS_TRIES; tries; --tries) { transval = qib_read_kreg32(dd, trans); if (transval & EPB_TRANS_RDY) -- 1.8.3.1