Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp1220589pxy; Thu, 6 May 2021 03:18:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjxDyQkuMiNuTbOh/w6TPF0GCR32iD86u3iZtXnb8d8HltwY45EqSl8lvH4eZTRUJAD0Uy X-Received: by 2002:a17:906:f295:: with SMTP id gu21mr3501834ejb.500.1620296310213; Thu, 06 May 2021 03:18:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620296310; cv=none; d=google.com; s=arc-20160816; b=vBiATiC+nxumj0piIT49WhThRYlgkajf4XrPbMJCGMPOjb1x7ayWzGt66mdlzm0JLO Gx6a2Tk0TXSvcHGdVMfSAr5xxWmBLVlEEkoYtThSl58e7DwHTt5gShVzcN4lCeYl2rCv HK5smar5tEti30edIOQYSHQbhvAHwCgBiVxX1WMUf7p0KrN1Mca3/DPq2vfMvikMHdkc RISyZ1uPAyYiFu2i5g6ruPpBWHXhEHLem5sDzdClM5wRJu4voo9EAs2CYSwFMGQeDd99 U8on9gFKScpRzC98ANU4otYGaAAKmhoGqWN7CwiCI4/3FvylV7K3KPjHfKuXZr/nEhGG 6qtw== 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=nLhwTo1bipDYEfLIrupcnSVZTRML0tJPqNb+vT+/EtA=; b=AbaNZsUc/gq/OP2GqbcpikPKS59Za9PDa//tPH4m7uAlrk2KvehNYKfs1RZ0Pg7r+n dY6qzysRVDchg/5B+uz7fghlqxD8XxA8C4fT1Vg04nFJ94ucHUQ1wEMypmsV9X6ymxpM ZeKBqj9O3BzQDgeztjAHPKwgr26IrVzDBFYh1sX9f7C6PmENx6OEiNKxc8hY6Di+3Ea4 xj7SPvHssTxm4KkMbnqnSIJgtiziWNID5wKBlZVo/295KHQkzTu3QSyJupFRL/vZ9qK6 TaSODADQdIX9HoarXTgbgcyfKi+yAwDQSx9CwVahgC9U03CyFk9OxaefrcEDxkQKNIK7 NJWQ== 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 j3si1790534eds.269.2021.05.06.03.18.06; Thu, 06 May 2021 03:18:30 -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 S234016AbhEFKQK (ORCPT + 99 others); Thu, 6 May 2021 06:16:10 -0400 Received: from out30-57.freemail.mail.aliyun.com ([115.124.30.57]:55482 "EHLO out30-57.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232512AbhEFKQI (ORCPT ); Thu, 6 May 2021 06:16:08 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R201e4;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_---0UXygmBf_1620296106; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0UXygmBf_1620296106) by smtp.aliyun-inc.com(127.0.0.1); Thu, 06 May 2021 18:15:07 +0800 From: Yang Li To: bvanassche@acm.org Cc: dledford@redhat.com, jgg@ziepe.ca, nathan@kernel.org, ndesaulniers@google.com, linux-rdma@vger.kernel.org, target-devel@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Yang Li Subject: [PATCH] ib_srpt: Remove redundant assignment to ret Date: Thu, 6 May 2021 18:15:05 +0800 Message-Id: <1620296105-121964-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 -ENOMEM 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 In 'commit b79fafac70fc ("target: make queue_tm_rsp() return void")' srpt_queue_response() has been changed to return void, so after "goto out", there is no need to return ret. Clean up the following clang-analyzer warning: drivers/infiniband/ulp/srpt/ib_srpt.c:2860:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores] Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/infiniband/ulp/srpt/ib_srpt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c index ea44780..3cadf12 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.c +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c @@ -2858,7 +2858,6 @@ static void srpt_queue_response(struct se_cmd *cmd) &ch->sq_wr_avail) < 0)) { pr_warn("%s: IB send queue full (needed %d)\n", __func__, ioctx->n_rdma); - ret = -ENOMEM; goto out; } -- 1.8.3.1