Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3224442yba; Sat, 11 May 2019 06:28:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqyC2Af/0R6aDfDXZ2e9Dr/KemAuYyNKxJ/1fUzQrsZ/4oC+9MBCKr1L1ovrouCQNEpihHQf X-Received: by 2002:a62:4697:: with SMTP id o23mr21933901pfi.224.1557581289142; Sat, 11 May 2019 06:28:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557581289; cv=none; d=google.com; s=arc-20160816; b=gqzue6dGS5u4fcOkLE8oeNVG5qYzvtNOjJBM6BkOSLU3iOIJopMYaFGtlvjqKFxoLT BoG6nBEY4p8TTJfR5cSmtKwH9mXlpifive4l1sgsY5hovrJ6yaM7F9snUxpuAacvKG92 P1ebYwT6D3uaU+YccGLQHwh+aohk+SzJKx0zevRNY5b5yZtqzvY4uqaFI00R5PtoTnvU cjkSqPzToF9MwOhwPd3gB0wleXuSo6cRW2SNibj9NQ7UjwOevm3AaAIV2F94e5nre7Yx 7E9887GQf62AhHUAFYjcUAncwrereuBlxNmQrBreG3EJOWPTD3yxZHTMeps6G2mNHwt4 uefA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=n/X+bdNE81RcswHSCie0VQo+9ZTggMyfQgDjvaCpSp8=; b=cKdAQ4uwL8H7lmkoorh29FW4MoTSru+AJ8V0pqmMK+QMmcdGXPmLymYI09JDvdxv3Y h3zAwegRQzS9cpENkL8Zc4+74/hzhJtX3A7ZU32HGgRDQq6nLznm2kEQicRU5wvfS2JJ 2+8qB0phMFnDkC8HSSsjtLHejnEvnqzacSfbDhkN5aktRUt+jtTOjwvbLzMimeFj2dA6 0bzazXOJPiqdSEo/TaLG+xR4J3szDwy4dLLTagMOjSl6wFW7+g/pS8zhpvMBi3P+YjR9 qHA0okdL5qL31HCCF3ueUkhQhb5niZQAB97fvVeMMRiapcPLuCwjYv8CU+8icMzZzMWu UF/A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i195si1239774pfe.20.2019.05.11.06.27.53; Sat, 11 May 2019 06:28:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728603AbfEKN1E (ORCPT + 99 others); Sat, 11 May 2019 09:27:04 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:35525 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728559AbfEKN1E (ORCPT ); Sat, 11 May 2019 09:27:04 -0400 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1hPS1l-0003mv-9X; Sat, 11 May 2019 13:27:01 +0000 From: Colin King To: Mike Marshall , Martin Brandenburg , devel@lists.orangefs.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] orangefs: remove redundant assignment to variable buffer_index Date: Sat, 11 May 2019 14:27:00 +0100 Message-Id: <20190511132700.4862-1-colin.king@canonical.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King The variable buffer_index is being initialized however this is never read and later it is being reassigned to a new value. The initialization is redundant and hence can be removed. Addresses-Coverity: ("Unused Value") Signed-off-by: Colin Ian King --- fs/orangefs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c index a35c17017210..80f06ee794c5 100644 --- a/fs/orangefs/file.c +++ b/fs/orangefs/file.c @@ -52,7 +52,7 @@ ssize_t wait_for_direct_io(enum ORANGEFS_io_type type, struct inode *inode, struct orangefs_inode_s *orangefs_inode = ORANGEFS_I(inode); struct orangefs_khandle *handle = &orangefs_inode->refn.khandle; struct orangefs_kernel_op_s *new_op = NULL; - int buffer_index = -1; + int buffer_index; ssize_t ret; size_t copy_amount; -- 2.20.1