[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20250801035908.370463-1-zhao.xichao@vivo.com>
Date: Fri, 1 Aug 2025 11:59:08 +0800
From: Xichao Zhao <zhao.xichao@...o.com>
To: maddy@...ux.ibm.com,
mpe@...erman.id.au
Cc: npiggin@...il.com,
christophe.leroy@...roup.eu,
linuxppc-dev@...ts.ozlabs.org,
linux-kernel@...r.kernel.org,
Xichao Zhao <zhao.xichao@...o.com>
Subject: [PATCH] powerpc/64: Drop unnecessary 'rc' variable
Simplify the code to enhance readability and maintain a consistent
coding style.
Signed-off-by: Xichao Zhao <zhao.xichao@...o.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
Powered by blists - more mailing lists