mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH linux-next] ata: libata-eh: Remove the unneeded result variable
@ 2022-09-20  6:29 cgel.zte
  2022-09-21  4:39 ` Damien Le Moal
  0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2022-09-20  6:29 UTC (permalink / raw)
  To: damien.lemoal; +Cc: linux-ide, linux-kernel, ye xingchen, Zeal Robot

From: ye xingchen <ye.xingchen@zte.com.cn>

Return the value ata_port_abort() directly instead of storing it in
another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
 drivers/ata/libata-eh.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 7c128c89b454..7dbca2a2f9ee 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -1086,14 +1086,11 @@ static void __ata_port_freeze(struct ata_port *ap)
  */
 int ata_port_freeze(struct ata_port *ap)
 {
-	int nr_aborted;
-
 	WARN_ON(!ap->ops->error_handler);
 
 	__ata_port_freeze(ap);
-	nr_aborted = ata_port_abort(ap);
 
-	return nr_aborted;
+	return ata_port_abort(ap);
 }
 EXPORT_SYMBOL_GPL(ata_port_freeze);
 
-- 
2.25.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH linux-next] ata: libata-eh: Remove the unneeded result variable
  2022-09-20  6:29 [PATCH linux-next] ata: libata-eh: Remove the unneeded result variable cgel.zte
@ 2022-09-21  4:39 ` Damien Le Moal
  0 siblings, 0 replies; 2+ messages in thread
From: Damien Le Moal @ 2022-09-21  4:39 UTC (permalink / raw)
  To: cgel.zte; +Cc: linux-ide, linux-kernel, ye xingchen, Zeal Robot

On 9/20/22 15:29, cgel.zte@gmail.com wrote:
> From: ye xingchen <ye.xingchen@zte.com.cn>
> 
> Return the value ata_port_abort() directly instead of storing it in
> another redundant variable.
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>

Applied to for-6.1. Thanks !

> ---
>   drivers/ata/libata-eh.c | 5 +----
>   1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
> index 7c128c89b454..7dbca2a2f9ee 100644
> --- a/drivers/ata/libata-eh.c
> +++ b/drivers/ata/libata-eh.c
> @@ -1086,14 +1086,11 @@ static void __ata_port_freeze(struct ata_port *ap)
>    */
>   int ata_port_freeze(struct ata_port *ap)
>   {
> -	int nr_aborted;
> -
>   	WARN_ON(!ap->ops->error_handler);
>   
>   	__ata_port_freeze(ap);
> -	nr_aborted = ata_port_abort(ap);
>   
> -	return nr_aborted;
> +	return ata_port_abort(ap);
>   }
>   EXPORT_SYMBOL_GPL(ata_port_freeze);
>   

-- 
Damien Le Moal
Western Digital Research


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-21  4:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-20  6:29 [PATCH linux-next] ata: libata-eh: Remove the unneeded result variable cgel.zte
2022-09-21  4:39 ` 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®