Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4294815pxj; Wed, 12 May 2021 02:20:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVoa+oMAOkzcNhio+UdV5GR5Lm6Migmk6G04qOFvYowpML0yg5bTZD7fsHzGUwJzMil3jn X-Received: by 2002:a17:906:1e0b:: with SMTP id g11mr36197064ejj.291.1620811253601; Wed, 12 May 2021 02:20:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620811253; cv=none; d=google.com; s=arc-20160816; b=M5lBM5H9c6t+DUkOmklUhHCWLou6sMtFFJsC+xQyoxAcCfgBsk4L1deL674n9q9JaX /2WhZPOSBimYzDgNFsKrZqilvjXg2MRcMYEz+aF2e65y1oB0qlZbino+enlaPRpZwfmU Ww9JWnwj1jdkOJsc3w2KLWDbmt+IbJryY2XKfilwkbLn1xh8hRmBaCor/wRl/qgy/Ezu PLs+12UQHuc1ZgC7s3zVe5x6z/eZyIkixC/BcSwqGRNpcJ0RZpJJVdix8fwJl2IY3ILo 7+5O2kSAF1j0tg4gtfKO5LLcbPnufgrCDvU2dckLfaLPgZxXwT+QvRyRYVpPdd0f10oB PNEA== 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=B+LFv53D3zy2qXjm3gDaB5UdNh/zpkG9qeQ85kRdYio=; b=RUUCL+sjES0tW2uS7KqPkIQo0UJ9pUNpEwZ8fR+DVviGicHAPoJesw/Wd2oX0vmsz0 FvzEeUoa5bPLy8nxLAZ5c813TTz4wiNU63PJQAaXbq5LRlyg2dLhTsdfWeX1hbHCmhfV tr8gUO+F9T/YjmMs0L7Fs817ZtUhU6UBoQBfMGvjmg4CrpXt0P+WOnfSSeyvK0PxHCe4 BixieCjGiooD1BHUljlWmpTQ4K99ciGf1gHEshd5WyEknhaMTLzW/m6Ekh20mFEzIZzm FPiVFUh8wsWwMj9XyFqiWrHvMP+uILh7PmCOOvHTUVu6pBGmyVDhqR0MxhC7pPiGgodn kPMA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-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 en21si18983158ejc.713.2021.05.12.02.20.20; Wed, 12 May 2021 02:20:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-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-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-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 S229968AbhELJVR (ORCPT + 99 others); Wed, 12 May 2021 05:21:17 -0400 Received: from out30-130.freemail.mail.aliyun.com ([115.124.30.130]:49073 "EHLO out30-130.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230118AbhELJVR (ORCPT ); Wed, 12 May 2021 05:21:17 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=alimailimapcm10staff010182156082;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0UYd96fc_1620811206; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0UYd96fc_1620811206) by smtp.aliyun-inc.com(127.0.0.1); Wed, 12 May 2021 17:20:07 +0800 From: Yang Li To: trond.myklebust@hammerspace.com Cc: anna.schumaker@netapp.com, nathan@kernel.org, ndesaulniers@google.com, linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Yang Li Subject: [PATCH] pNFS/NFSv4: Remove redundant initialization of 'rd_size' Date: Wed, 12 May 2021 17:20:04 +0800 Message-Id: <1620811204-107673-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-nfs@vger.kernel.org Variable 'rd_size' is being initialized however this value is never read as 'rd_size' is assigned a new value in for statement. Remove the redundant assignment. Clean up clang warning: fs/nfs/pnfs.c:2681:6: warning: Value stored to 'rd_size' during its initialization is never read [clang-analyzer-deadcode.DeadStores] Reported-by: Abaci Robot Signed-off-by: Yang Li --- fs/nfs/pnfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index 03e0b34..f076a6f 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -2678,7 +2678,7 @@ void pnfs_error_mark_layout_for_return(struct inode *inode, void pnfs_generic_pg_init_read(struct nfs_pageio_descriptor *pgio, struct nfs_page *req) { - u64 rd_size = req->wb_bytes; + u64 rd_size; pnfs_generic_pg_check_layout(pgio); pnfs_generic_pg_check_range(pgio, req); -- 1.8.3.1