From: Colin King <colin.king@canonical.com> To: Mike Marshall <hubcap@omnibond.com>, Martin Brandenburg <martin@omnibond.com>, 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 [thread overview] Message-ID: <20190511132700.4862-1-colin.king@canonical.com> (raw) From: Colin Ian King <colin.king@canonical.com> 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 <colin.king@canonical.com> --- 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
WARNING: multiple messages have this Message-ID (diff)
From: Colin King <colin.king@canonical.com> To: Mike Marshall <hubcap@omnibond.com>, Martin Brandenburg <martin@omnibond.com>, 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 13:27:00 +0000 [thread overview] Message-ID: <20190511132700.4862-1-colin.king@canonical.com> (raw) From: Colin Ian King <colin.king@canonical.com> 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 <colin.king@canonical.com> --- 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
next reply other threads:[~2019-05-11 13:27 UTC|newest] Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-05-11 13:27 Colin King [this message] 2019-05-11 13:27 ` [PATCH] orangefs: remove redundant assignment to variable buffer_index Colin King 2019-05-16 16:06 ` Mike Marshall 2019-05-16 16:06 ` Mike Marshall 2019-05-21 15:03 ` Dan Carpenter 2019-05-21 15:03 ` Dan Carpenter 2019-06-25 18:55 ` Mike Marshall 2019-06-25 18:55 ` Mike Marshall 2019-06-26 6:18 ` Dan Carpenter 2019-06-26 6:18 ` Dan Carpenter 2019-06-26 14:56 ` Colin Ian King 2019-06-26 14:56 ` Colin Ian King 2019-05-21 15:01 ` Dan Carpenter 2019-05-21 15:01 ` Dan Carpenter 2019-07-28 18:04 [PATCH] orangefs: remove redundant assignment to err Colin King 2019-07-28 18:04 ` Colin King 2020-05-24 22:48 [PATCH] orangefs: remove redundant assignment to variable ret Colin King 2020-05-24 22:48 ` Colin King 2020-06-01 11:15 ` Mike Marshall 2020-06-01 11:15 ` Mike Marshall 2022-10-17 21:49 [PATCH] orangefs: remove redundant assignment to variable buffer_index Colin Ian King
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190511132700.4862-1-colin.king@canonical.com \ --to=colin.king@canonical.com \ --cc=devel@lists.orangefs.org \ --cc=hubcap@omnibond.com \ --cc=kernel-janitors@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=martin@omnibond.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.