* [PATCH v2] drivers/firmware/psci: Assign @err directly in hotplug_tests()
@ 2020-06-30 7:59 Gavin Shan
2020-07-08 22:02 ` Will Deacon
0 siblings, 1 reply; 2+ messages in thread
From: Gavin Shan @ 2020-06-30 7:59 UTC (permalink / raw)
To: linux-arm-kernel; +Cc: mark.rutland, catalin.marinas, will, sudeep.holla
The return value of down_and_up_cpus() can be assigned to @err directly.
With that, the useless assignment to @err with zero can be dropped.
Signed-off-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
---
v2: Pick r-b from Sudeep and rebase to 5.8.rc3
---
drivers/firmware/psci/psci_checker.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/firmware/psci/psci_checker.c b/drivers/firmware/psci/psci_checker.c
index d9b1a2d71223..3d6ba425dbb9 100644
--- a/drivers/firmware/psci/psci_checker.c
+++ b/drivers/firmware/psci/psci_checker.c
@@ -199,13 +199,12 @@ static int hotplug_tests(void)
if (!page_buf)
goto out_free_cpu_groups;
- err = 0;
/*
* Of course the last CPU cannot be powered down and cpu_down() should
* refuse doing that.
*/
pr_info("Trying to turn off and on again all CPUs\n");
- err += down_and_up_cpus(cpu_online_mask, offlined_cpus);
+ err = down_and_up_cpus(cpu_online_mask, offlined_cpus);
/*
* Take down CPUs by cpu group this time. When the last CPU is turned
--
2.23.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] drivers/firmware/psci: Assign @err directly in hotplug_tests()
2020-06-30 7:59 [PATCH v2] drivers/firmware/psci: Assign @err directly in hotplug_tests() Gavin Shan
@ 2020-07-08 22:02 ` Will Deacon
0 siblings, 0 replies; 2+ messages in thread
From: Will Deacon @ 2020-07-08 22:02 UTC (permalink / raw)
To: Gavin Shan, linux-arm-kernel
Cc: mark.rutland, catalin.marinas, kernel-team, Will Deacon, sudeep.holla
On Tue, 30 Jun 2020 17:59:43 +1000, Gavin Shan wrote:
> The return value of down_and_up_cpus() can be assigned to @err directly.
> With that, the useless assignment to @err with zero can be dropped.
Applied to arm64 (for-next/fixes), thanks!
[1/1] drivers/firmware/psci: Assign @err directly in hotplug_tests()
https://git.kernel.org/arm64/c/132330f8044c
Cheers,
--
Will
https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-08 22:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-30 7:59 [PATCH v2] drivers/firmware/psci: Assign @err directly in hotplug_tests() Gavin Shan
2020-07-08 22:02 ` Will Deacon
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.