All of lore.kernel.org
 help / color / mirror / Atom feed
From: "libaokun (A)" <libaokun1@huawei.com>
To: <davem@davemloft.net>, <linux-ide@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Cc: <weiyongjun1@huawei.com>, <yuehaibing@huawei.com>,
	<yangjihong1@huawei.com>, <yukuai3@huawei.com>
Subject: Re: [PATCH -next] ide-cd: fix warning: variable 'stat' set but not used
Date: Tue, 15 Jun 2021 09:59:51 +0800	[thread overview]
Message-ID: <3832bef1-6181-4606-93f4-7432c92a5198@huawei.com> (raw)
In-Reply-To: <20210529061729.2824082-1-libaokun1@huawei.com>

ping

在 2021/5/29 14:17, Baokun Li 写道:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/ide/ide-cd_ioctl.c: In function 'ide_cdrom_select_speed':
> drivers/ide/ide-cd_ioctl.c:212:6: warning:
>   variable ‘stat’ set but not used [-Wunused-but-set-variable]
>
> It never used since introduction.
>
> Signed-off-by: Baokun Li <libaokun1@huawei.com>
> ---
>   drivers/ide/ide-cd_ioctl.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/drivers/ide/ide-cd_ioctl.c b/drivers/ide/ide-cd_ioctl.c
> index 011eab9c69b7..8d0a52123349 100644
> --- a/drivers/ide/ide-cd_ioctl.c
> +++ b/drivers/ide/ide-cd_ioctl.c
> @@ -231,6 +231,8 @@ int ide_cdrom_select_speed(struct cdrom_device_info *cdi, int speed)
>   	}
>   
>   	stat = ide_cd_queue_pc(drive, cmd, 0, NULL, NULL, NULL, 0, 0);
> +	if (stat)
> +		return stat;
>   
>   	if (!ide_cdrom_get_capabilities(drive, buf)) {
>   		ide_cdrom_update_speed(drive, buf);

  reply	other threads:[~2021-06-15  2:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-29  6:17 [PATCH -next] ide-cd: fix warning: variable 'stat' set but not used Baokun Li
2021-06-15  1:59 ` libaokun (A) [this message]
2021-06-15 21:45 ` Jens Axboe
2021-06-16  1:05   ` libaokun (A)

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=3832bef1-6181-4606-93f4-7432c92a5198@huawei.com \
    --to=libaokun1@huawei.com \
    --cc=davem@davemloft.net \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=weiyongjun1@huawei.com \
    --cc=yangjihong1@huawei.com \
    --cc=yuehaibing@huawei.com \
    --cc=yukuai3@huawei.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: link
Be 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.