Thread (4 messages) 4 messages, 2 authors, 2020-08-03

Re: [PATCH] acpi: fix 'return' with no value build warning

From: Neal Liu <hidden>
Date: 2020-08-03 02:41:12
Also in: linux-acpi, linux-mediatek, linux-pm, linux-tegra, lkml

On Fri, 2020-07-31 at 13:33 +0200, Rafael J. Wysocki wrote:
On Fri, Jul 31, 2020 at 5:39 AM Neal Liu [off-list ref] wrote:
quoted
Fixing CFI issue which introduced by commit efe9711214e6 is
incomplete.
Add return value to fix return-type build warning.

Signed-off-by: Neal Liu <redacted>
Applied with edited subject and changelog, but ->
quoted
---
 drivers/acpi/processor_idle.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 6ffb6c9..6870020 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -664,11 +664,11 @@ static int acpi_idle_enter_s2idle(struct cpuidle_device *dev,
                struct acpi_processor *pr = __this_cpu_read(processors);

                if (unlikely(!pr))
-                       return;
+                       return -EFAULT;
-> there is no point returning an error code here, so I've made it
just return 0.
return 0 is not matched with the meaning of contexts, but it's fine for
this patch.
Thanks !
quoted

                if (pr->flags.bm_check) {
                        acpi_idle_enter_bm(pr, cx, false);
-                       return;
+                       return 0;
                } else {
                        ACPI_FLUSH_CPU_CACHE();
                }
--
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help