* [PATCH -next] ide-cd: fix warning: variable 'stat' set but not used
@ 2021-05-29 6:17 Baokun Li
2021-06-15 1:59 ` libaokun (A)
2021-06-15 21:45 ` Jens Axboe
0 siblings, 2 replies; 4+ messages in thread
From: Baokun Li @ 2021-05-29 6:17 UTC (permalink / raw)
To: davem, linux-ide, linux-kernel
Cc: weiyongjun1, yuehaibing, yangjihong1, yukuai3, libaokun1
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);
--
2.25.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH -next] ide-cd: fix warning: variable 'stat' set but not used
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)
2021-06-15 21:45 ` Jens Axboe
1 sibling, 0 replies; 4+ messages in thread
From: libaokun (A) @ 2021-06-15 1:59 UTC (permalink / raw)
To: davem, linux-ide, linux-kernel
Cc: weiyongjun1, yuehaibing, yangjihong1, yukuai3
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);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -next] ide-cd: fix warning: variable 'stat' set but not used
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)
@ 2021-06-15 21:45 ` Jens Axboe
2021-06-16 1:05 ` libaokun (A)
1 sibling, 1 reply; 4+ messages in thread
From: Jens Axboe @ 2021-06-15 21:45 UTC (permalink / raw)
To: Baokun Li, davem, linux-ide, linux-kernel
Cc: weiyongjun1, yuehaibing, yangjihong1, yukuai3
On 5/29/21 12:17 AM, Baokun Li wrote:
> 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.
This code is being removed shortly, so better to just leave it alone.
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -next] ide-cd: fix warning: variable 'stat' set but not used
2021-06-15 21:45 ` Jens Axboe
@ 2021-06-16 1:05 ` libaokun (A)
0 siblings, 0 replies; 4+ messages in thread
From: libaokun (A) @ 2021-06-16 1:05 UTC (permalink / raw)
To: Jens Axboe, davem, linux-ide, linux-kernel
Cc: weiyongjun1, yuehaibing, yangjihong1, yukuai3
Thank you for your reminder.
Best Regards.
在 2021/6/16 5:45, Jens Axboe 写道:
> On 5/29/21 12:17 AM, Baokun Li wrote:
>> 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.
> This code is being removed shortly, so better to just leave it alone.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-06-16 1:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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)
2021-06-15 21:45 ` Jens Axboe
2021-06-16 1:05 ` libaokun (A)
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).