* [PATCH linux-next] ata: libata-core: remove redundant err_mask variable
@ 2022-08-23 12:29 cgel.zte
2022-08-25 22:47 ` Damien Le Moal
0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2022-08-23 12:29 UTC (permalink / raw)
To: damien.lemoal; +Cc: linux-ide, linux-kernel, Jinpeng Cui, Zeal Robot
From: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
Return value from ata_exec_internal() directly instead of
taking this in another redundant variable.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
---
drivers/ata/libata-core.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 864b26009eae..0ba0e692210f 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -4340,7 +4340,6 @@ static unsigned int ata_dev_set_xfermode(struct ata_device *dev)
unsigned int ata_dev_set_feature(struct ata_device *dev, u8 subcmd, u8 action)
{
struct ata_taskfile tf;
- unsigned int err_mask;
unsigned int timeout = 0;
/* set up set-features taskfile */
@@ -4356,9 +4355,8 @@ unsigned int ata_dev_set_feature(struct ata_device *dev, u8 subcmd, u8 action)
if (subcmd == SETFEATURES_SPINUP)
timeout = ata_probe_timeout ?
ata_probe_timeout * 1000 : SETFEATURES_SPINUP_TIMEOUT;
- err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0, timeout);
- return err_mask;
+ return ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0, timeout);
}
EXPORT_SYMBOL_GPL(ata_dev_set_feature);
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH linux-next] ata: libata-core: remove redundant err_mask variable
2022-08-23 12:29 [PATCH linux-next] ata: libata-core: remove redundant err_mask variable cgel.zte
@ 2022-08-25 22:47 ` Damien Le Moal
0 siblings, 0 replies; 2+ messages in thread
From: Damien Le Moal @ 2022-08-25 22:47 UTC (permalink / raw)
To: cgel.zte; +Cc: linux-ide, linux-kernel, Jinpeng Cui, Zeal Robot
On 8/23/22 21:29, cgel.zte@gmail.com wrote:
> From: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
>
> Return value from ata_exec_internal() directly instead of
> taking this in another redundant variable.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
Applied to for-6.1. Thanks !
> ---
> drivers/ata/libata-core.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
> index 864b26009eae..0ba0e692210f 100644
> --- a/drivers/ata/libata-core.c
> +++ b/drivers/ata/libata-core.c
> @@ -4340,7 +4340,6 @@ static unsigned int ata_dev_set_xfermode(struct ata_device *dev)
> unsigned int ata_dev_set_feature(struct ata_device *dev, u8 subcmd, u8 action)
> {
> struct ata_taskfile tf;
> - unsigned int err_mask;
> unsigned int timeout = 0;
>
> /* set up set-features taskfile */
> @@ -4356,9 +4355,8 @@ unsigned int ata_dev_set_feature(struct ata_device *dev, u8 subcmd, u8 action)
> if (subcmd == SETFEATURES_SPINUP)
> timeout = ata_probe_timeout ?
> ata_probe_timeout * 1000 : SETFEATURES_SPINUP_TIMEOUT;
> - err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0, timeout);
>
> - return err_mask;
> + return ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0, timeout);
> }
> EXPORT_SYMBOL_GPL(ata_dev_set_feature);
>
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-08-25 22:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-23 12:29 [PATCH linux-next] ata: libata-core: remove redundant err_mask variable cgel.zte
2022-08-25 22:47 ` Damien Le Moal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®