kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Colin King <colin.king@canonical.com>,
	Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] block/mq-deadline: remove redundant assignment of variable ret
Date: Tue, 22 Jun 2021 14:14:44 -0700	[thread overview]
Message-ID: <dce79425-05fb-26a3-2f01-f9893de41513@acm.org> (raw)
In-Reply-To: <20210622161742.25194-1-colin.king@canonical.com>

On 6/22/21 9:17 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Variable ret is being assigned a value at the end of the function
> and the value is never read. The assignment is redundant and can
> be removed.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  block/mq-deadline-main.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/block/mq-deadline-main.c b/block/mq-deadline-main.c
> index 4815e536091f..e3091d922ba2 100644
> --- a/block/mq-deadline-main.c
> +++ b/block/mq-deadline-main.c
> @@ -639,7 +639,6 @@ static int dd_init_sched(struct request_queue *q, struct elevator_type *e)
>  	if (ret)
>  		goto free_stats;
>  
> -	ret = 0;
>  	q->elevator = eq;
>  	return 0;

Reviewed-by: Bart Van Assche <bvanassche@acm.org>

  reply	other threads:[~2021-06-22 21:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-22 16:17 Colin King
2021-06-22 21:14 ` Bart Van Assche [this message]
2021-06-22 21:15   ` Jens Axboe

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=dce79425-05fb-26a3-2f01-f9893de41513@acm.org \
    --to=bvanassche@acm.org \
    --cc=axboe@kernel.dk \
    --cc=colin.king@canonical.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [PATCH][next] block/mq-deadline: remove redundant assignment of variable ret' \
    /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

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).