Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp4404760pxy; Tue, 27 Apr 2021 04:25:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWcJe+lkjeiNNBEAICaO0pzqooH9mKi8MgBnSU1pylKlPo1eU86bwUDBZgDWcxLIpC7iF9 X-Received: by 2002:a05:6402:154a:: with SMTP id p10mr3716193edx.77.1619522701633; Tue, 27 Apr 2021 04:25:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619522701; cv=none; d=google.com; s=arc-20160816; b=tOgDC41Rs+LweJBF8pJpqFqkpqgmjEbcOpOelAAofrqwFnoY8gpE+8WcMuCl8xUYzu /jEL8pXLnZuY2cRrgMfK81kX+anz5W/AvQMkbhzXmQ+iakNRCquuFaJzGogqLjL/DhpO PWIy5VMX2sZuN5LoORCpLcRMtITSsacFHRj8HySLnKF3iWhuU3fHjvv24atC1yYvURcQ GCx5wuthwgdOE0Whxn0I4KT47CHqcHzZpbJdgepbTYg76DH++SBtzBOjNmtrUa1jJcp0 kJfWyjtaiB+4gOcSk0iPootmG1GimCCLRSPLAxVOnAJP0kztpRvbb9MpAs1GN/Jj8772 ep1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=b3lZBEeIXhKOUrb/pb6bVSXJWinWlyZd4CzbqdPUjj8=; b=Z11UOUqscLwtzyy3jKHb86f28aI7KL0SWYNI524PUpkr98kvBeK0sLn1izmWp6Feme LXLp1cyITS+LUlAC5bUf864VHXZVYfnDchAS2w99ik/8WNuEuh45E9+Apqj7bhUuMpJd aTHJteDhnRnE8K+iTdRikfhDvosodGIansf/29r+09Xz6DR0x2NjD8Ei2qoP81dWdeDz y3u61GoQwj3g1jIQup7Jyx90+3yaN2360Eyn5p5OUQACnceiACEeZcrOFxASq31K1rZw t5d0hs85jxm4z3EatvGQTfvl/dAxtFBdGboE85/DNfGvd0dP5M2ea+ywauatqzVgTv2N fY2A== 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 c10si2286247ede.84.2021.04.27.04.24.38; Tue, 27 Apr 2021 04:25:01 -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 S235099AbhD0LYD (ORCPT + 99 others); Tue, 27 Apr 2021 07:24:03 -0400 Received: from out30-132.freemail.mail.aliyun.com ([115.124.30.132]:40301 "EHLO out30-132.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230270AbhD0LYC (ORCPT ); Tue, 27 Apr 2021 07:24:02 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R161e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04420;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0UX-4Cd8_1619522596; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0UX-4Cd8_1619522596) by smtp.aliyun-inc.com(127.0.0.1); Tue, 27 Apr 2021 19:23:17 +0800 From: Yang Li To: mporter@kernel.crashing.org Cc: alex.bou9@gmail.com, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH] drivers/rapidio/rio-scan.c: drop unneeded assignment in rio_enum_peer() Date: Tue, 27 Apr 2021 19:23:15 +0800 Message-Id: <1619522595-105320-1-git-send-email-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain; charset=n Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Making '<' operation with port->host_deviceid directly after calling the function rio_get_host_deviceid_lock(() is more efficient, so assignment to ‘tmp’ is redundant. Eliminate the following clang_analyzer warning: drivers/rapidio/rio-scan.c:561:10: warning: Although the value stored to 'tmp' is used in the enclosing expression, the value is never actually read from 'tmp' No functional change. Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/rapidio/rio-scan.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/rapidio/rio-scan.c b/drivers/rapidio/rio-scan.c index 19b0c33..2bc4d1e 100644 --- a/drivers/rapidio/rio-scan.c +++ b/drivers/rapidio/rio-scan.c @@ -524,7 +524,6 @@ static int rio_enum_peer(struct rio_net *net, struct rio_mport *port, { struct rio_dev *rdev; u32 regval; - int tmp; if (rio_mport_chk_dev_access(port, RIO_ANY_DESTID(port->sys_size), hopcount)) { @@ -558,7 +557,7 @@ static int rio_enum_peer(struct rio_net *net, struct rio_mport *port, rio_mport_write_config_32(port, RIO_ANY_DESTID(port->sys_size), hopcount, RIO_HOST_DID_LOCK_CSR, port->host_deviceid); - while ((tmp = rio_get_host_deviceid_lock(port, hopcount)) + while (rio_get_host_deviceid_lock(port, hopcount) < port->host_deviceid) { /* Delay a bit */ mdelay(1); -- 1.8.3.1