Skip to contentSkip to conversation

ata: libata-eh: Remove the unneeded result variable

PATCH Applied [email protected] 2 participants 2 messages Sep 20, 2022 – Sep 21, 2022 libata

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ata: libata-eh: Remove the unneeded result variable

From: ye xingchen <[email protected]>

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

---
 drivers/ata/libata-eh.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/ata/libata-eh.c +1 -4
index 7c128c89b454..7dbca2a2f9ee 100644
@@ -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);
 
Signature · 1 line
2.25.1
#1 lore raw
Quoted 7 lines · On 9/20/22 15:29, [email protected] wrote:

From: ye xingchen <[email protected]>

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

Applied to for-6.1. Thanks !

Quoted 24 lines
---
  drivers/ata/libata-eh.c | 5 +----
  1 file changed, 1 insertion(+), 4 deletions(-)
drivers/ata/libata-eh.c +1 -4
index 7c128c89b454..7dbca2a2f9ee 100644
@@ -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);
 
Signature · 2 lines
Damien Le Moal
Western Digital Research