Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp151017pxy; Fri, 30 Apr 2021 02:26:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztkWkN3gn100fjI+VvfkfDwPpYwmBQ18GowdY5v1R548vQ2whkk604WzhHfy5XWtMoqfS8 X-Received: by 2002:a05:6402:b2c:: with SMTP id bo12mr4746123edb.196.1619774780099; Fri, 30 Apr 2021 02:26:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619774780; cv=none; d=google.com; s=arc-20160816; b=ohwnQ+Ji6gPnaCzFAJyk5s8+yuQlgQGn3yqjT+stq2N0Hwi9O5HWuHR51PsA/TI4RL IYAOxgr4S4OXMnJmu/rBmD9tga7aG4ovx9o5YpDm3E8XE9VjsI7TV8VJeRvB6b9n6qkF 31oD3ITW1FWBsjStN3iXo+HTRe9h7ifTMbzZAseJDi74Mb8SMQDD+aCwq7pbdzLg6RD0 7itwKEbQyE1/8f6WXO2sITFAAUQRmEL0wGGOqO//3QyEyR0GJ5z2BlCkCWpZzu5pi2EQ RFRX3ImutuNJp3mpU9X3XJg1Dr+hyh6dbSmDkZBMol29aVnUc7G1Rt51gG37BwOC2aTr qpvw== 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=+stOgsInxvyCnEDLH96aeu8I3eGSS9au9+XCzkdwiiA=; b=L89q1wQ0OGGmBn9EPKiRiKGUZvruNXvGVVmyvJRG0qLoqmXzjrgKqILS0v6QfzfxMr 3OxNfYD+ZjW9JZGQq32BoQ4/aT9J3sJxbxUop9lMvFyPBmJsp4oatrKhZvdBk1wNQMB1 BHBkm6R59V2kRmAMuo9GAMgOqDUFvrxbj8EqVo1i5vkesLyzfM7nQ3juoFUHi37b5tXi j4o0PsdFpdssqnb9d8ISu/sY1VtkvTdsMg7NFTPfqmqa/684UKk4IN4ycjtCVq4+6v2n EqaO4tsEChiG2aUbaqXl/XYlVyxIm9Z7agR2HOO0LPz1NkNiUzcbmS/MtdfUp8rfxKQt wLtA== 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 8si3307851ejx.447.2021.04.30.02.25.56; Fri, 30 Apr 2021 02:26:20 -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 S231696AbhD3JZI (ORCPT + 99 others); Fri, 30 Apr 2021 05:25:08 -0400 Received: from out30-133.freemail.mail.aliyun.com ([115.124.30.133]:37368 "EHLO out30-133.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231646AbhD3JZB (ORCPT ); Fri, 30 Apr 2021 05:25:01 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R101e4;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=5;SR=0;TI=SMTPD_---0UXFS4v5_1619774628; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0UXFS4v5_1619774628) by smtp.aliyun-inc.com(127.0.0.1); Fri, 30 Apr 2021 17:24:11 +0800 From: Jiapeng Chong To: martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] scsi: target: configfs: Remove redundant assignment to ret Date: Fri, 30 Apr 2021 17:23:47 +0800 Message-Id: <1619774627-118766-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 ret is set to '-EINVAL' but this value is never read as it is overwritten later on, hence it is a redundant assignment and can be removed. Clean up the following clang-analyzer warning: drivers/target/target_core_configfs.c:2037:5: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]. drivers/target/target_core_configfs.c:1973:5: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]. drivers/target/target_core_configfs.c:1959:5: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/target/target_core_configfs.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c index 4b2e493..bda05c3 100644 --- a/drivers/target/target_core_configfs.c +++ b/drivers/target/target_core_configfs.c @@ -1956,7 +1956,6 @@ static ssize_t target_pr_res_aptpl_metadata_store(struct config_item *item, pr_err("APTPL metadata initiator_node=" " exceeds PR_APTPL_MAX_IPORT_LEN: %d\n", PR_APTPL_MAX_IPORT_LEN); - ret = -EINVAL; break; } break; @@ -1970,7 +1969,6 @@ static ssize_t target_pr_res_aptpl_metadata_store(struct config_item *item, pr_err("APTPL metadata initiator_isid" "= exceeds PR_REG_ISID_LEN: %d\n", PR_REG_ISID_LEN); - ret = -EINVAL; break; } break; @@ -2034,7 +2032,6 @@ static ssize_t target_pr_res_aptpl_metadata_store(struct config_item *item, pr_err("APTPL metadata target_node=" " exceeds PR_APTPL_MAX_TPORT_LEN: %d\n", PR_APTPL_MAX_TPORT_LEN); - ret = -EINVAL; break; } break; -- 1.8.3.1