Skip to contentSkip to conversation

drivers/acpi/apei: remove redundant rc variable

PATCH In review [email protected] 2 participants 2 messages Jan 12, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/acpi/apei: remove redundant rc variable

From: Minghao Chi <[email protected]>

Return value from apei_exec_write_register() directly instead of taking this in another redundant variable.

---
 drivers/acpi/apei/apei-base.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/acpi/apei/apei-base.c +1 -4
index c7fdb12c3310..87145b6b89aa 100644
@@ -125,12 +125,9 @@ EXPORT_SYMBOL_GPL(apei_exec_write_register);
 int apei_exec_write_register_value(struct apei_exec_context *ctx,
 				   struct acpi_whea_header *entry)
 {
-	int rc;
-
 	ctx->value = entry->value;
-	rc = apei_exec_write_register(ctx, entry);
+	return apei_exec_write_register(ctx, entry);
 
-	return rc;
 }
 EXPORT_SYMBOL_GPL(apei_exec_write_register_value);
 
Signature · 1 line
2.25.1
#1 lore raw
Quoted 9 lines · On Wed, Jan 12, 2022 at 9:02 AM <[email protected]> wrote:

From: Minghao Chi <[email protected]>

Return value from apei_exec_write_register() directly instead of taking this in another redundant variable.

Well, this doesn't look like an e-mail address of a physical person which is required for S-o-b tags.

Quoted 25 lines
---
 drivers/acpi/apei/apei-base.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/acpi/apei/apei-base.c +1 -5
index c7fdb12c3310..87145b6b89aa 100644
@@ -125,12 +125,9 @@ EXPORT_SYMBOL_GPL(apei_exec_write_register);
 int apei_exec_write_register_value(struct apei_exec_context *ctx,
                                   struct acpi_whea_header *entry)
 {
-       int rc;
-
        ctx->value = entry->value;
-       rc = apei_exec_write_register(ctx, entry);
+       return apei_exec_write_register(ctx, entry);
 
-       return rc;
 }
 EXPORT_SYMBOL_GPL(apei_exec_write_register_value);
 
--

2.25.1