* [PATCH] powerpc/64: Drop unnecessary 'rc' variable
@ 2025-08-01 3:59 Xichao Zhao
2025-08-04 9:30 ` Gautam Menghani
2025-08-28 6:33 ` Madhavan Srinivasan
0 siblings, 2 replies; 3+ messages in thread
From: Xichao Zhao @ 2025-08-01 3:59 UTC (permalink / raw)
To: maddy, mpe
Cc: npiggin, christophe.leroy, linuxppc-dev, linux-kernel,
Xichao Zhao
Simplify the code to enhance readability and maintain a consistent
coding style.
Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
---
arch/powerpc/kernel/setup_64.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 7284c8021eeb..8fd7cbf3bd04 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -141,10 +141,7 @@ void __init check_smt_enabled(void)
smt_enabled_at_boot = 0;
else {
int smt;
- int rc;
-
- rc = kstrtoint(smt_enabled_cmdline, 10, &smt);
- if (!rc)
+ if (!kstrtoint(smt_enabled_cmdline, 10, &smt))
smt_enabled_at_boot =
min(threads_per_core, smt);
}
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] powerpc/64: Drop unnecessary 'rc' variable
2025-08-01 3:59 [PATCH] powerpc/64: Drop unnecessary 'rc' variable Xichao Zhao
@ 2025-08-04 9:30 ` Gautam Menghani
2025-08-28 6:33 ` Madhavan Srinivasan
1 sibling, 0 replies; 3+ messages in thread
From: Gautam Menghani @ 2025-08-04 9:30 UTC (permalink / raw)
To: Xichao Zhao
Cc: maddy, mpe, npiggin, christophe.leroy, linuxppc-dev, linux-kernel
On Fri, Aug 01, 2025 at 11:59:08AM +0800, Xichao Zhao wrote:
> Simplify the code to enhance readability and maintain a consistent
> coding style.
>
>
> Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
> ---
> arch/powerpc/kernel/setup_64.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
> index 7284c8021eeb..8fd7cbf3bd04 100644
> --- a/arch/powerpc/kernel/setup_64.c
> +++ b/arch/powerpc/kernel/setup_64.c
> @@ -141,10 +141,7 @@ void __init check_smt_enabled(void)
> smt_enabled_at_boot = 0;
> else {
> int smt;
> - int rc;
> -
> - rc = kstrtoint(smt_enabled_cmdline, 10, &smt);
> - if (!rc)
> + if (!kstrtoint(smt_enabled_cmdline, 10, &smt))
> smt_enabled_at_boot =
> min(threads_per_core, smt);
> }
Thanks for the cleanup
Acked-by: Gautam Menghani <gautam@linux.ibm.com>
Thanks,
Gautam
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] powerpc/64: Drop unnecessary 'rc' variable
2025-08-01 3:59 [PATCH] powerpc/64: Drop unnecessary 'rc' variable Xichao Zhao
2025-08-04 9:30 ` Gautam Menghani
@ 2025-08-28 6:33 ` Madhavan Srinivasan
1 sibling, 0 replies; 3+ messages in thread
From: Madhavan Srinivasan @ 2025-08-28 6:33 UTC (permalink / raw)
To: mpe, Xichao Zhao; +Cc: npiggin, christophe.leroy, linuxppc-dev, linux-kernel
On Fri, 01 Aug 2025 11:59:08 +0800, Xichao Zhao wrote:
> Simplify the code to enhance readability and maintain a consistent
> coding style.
>
>
Applied to powerpc/fixes.
[1/1] powerpc/64: Drop unnecessary 'rc' variable
https://git.kernel.org/powerpc/c/8b5d86a63bc9510e094a15d7268c60bd4347b95c
Thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-08-28 6:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-01 3:59 [PATCH] powerpc/64: Drop unnecessary 'rc' variable Xichao Zhao
2025-08-04 9:30 ` Gautam Menghani
2025-08-28 6:33 ` Madhavan Srinivasan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).