From: Jeff Moyer <jmoyer@redhat.com>
To: Colin King <colin.king@canonical.com>
Cc: Benjamin LaHaise <bcrl@kvack.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
linux-aio@kvack.org, linux-fsdevel@vger.kernel.org,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] aio: remove redundant assignment to variable ret
Date: Thu, 22 Aug 2019 09:33:28 -0400 [thread overview]
Message-ID: <x49h8699vfb.fsf@segfault.boston.devel.redhat.com> (raw)
In-Reply-To: <20190822110705.19065-1-colin.king@canonical.com> (Colin King's message of "Thu, 22 Aug 2019 12:07:05 +0100")
Colin King <colin.king@canonical.com> writes:
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable ret is being set to -EINVAL however this is never read
> and later it is being reassigned to a new value. The assignment is
> redundant and hence can be removed.
>
> Addresses-Coverity: ("Unused Value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> fs/aio.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/fs/aio.c b/fs/aio.c
> index f9f441b59966..3e290dfac10a 100644
> --- a/fs/aio.c
> +++ b/fs/aio.c
> @@ -1528,7 +1528,6 @@ static int aio_read(struct kiocb *req, const struct iocb *iocb,
> file = req->ki_filp;
> if (unlikely(!(file->f_mode & FMODE_READ)))
> return -EBADF;
> - ret = -EINVAL;
> if (unlikely(!file->f_op->read_iter))
> return -EINVAL;
Acked-by: Jeff Moyer <jmoyer@redhat.com>
prev parent reply other threads:[~2019-08-22 13:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-22 11:07 [PATCH] aio: remove redundant assignment to variable ret Colin King
2019-08-22 13:33 ` Jeff Moyer [this message]
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=x49h8699vfb.fsf@segfault.boston.devel.redhat.com \
--to=jmoyer@redhat.com \
--cc=bcrl@kvack.org \
--cc=colin.king@canonical.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-aio@kvack.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).