* [PATCH v2] powerpc/512x: Make mpc512x_select_reset_compat() static
@ 2023-08-18 6:51 Christophe Leroy
2023-08-23 11:55 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Christophe Leroy @ 2023-08-18 6:51 UTC (permalink / raw)
To: Michael Ellerman, Nicholas Piggin; +Cc: linuxppc-dev, linux-kernel
mpc512x_select_reset_compat() is only used in the file it
is defined.
Make it static.
Move mpc512x_restart_init() after mpc512x_select_reset_compat().
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
v2: Move mpc512x_restart_init() after mpc512x_select_reset_compat().
---
arch/powerpc/platforms/512x/mpc512x.h | 1 -
arch/powerpc/platforms/512x/mpc512x_shared.c | 30 ++++++++++----------
2 files changed, 15 insertions(+), 16 deletions(-)
diff --git a/arch/powerpc/platforms/512x/mpc512x.h b/arch/powerpc/platforms/512x/mpc512x.h
index 2f3c60e373e1..d2cb06e3a436 100644
--- a/arch/powerpc/platforms/512x/mpc512x.h
+++ b/arch/powerpc/platforms/512x/mpc512x.h
@@ -13,7 +13,6 @@ extern void __init mpc512x_init(void);
extern void __init mpc512x_setup_arch(void);
extern int __init mpc5121_clk_init(void);
const char *__init mpc512x_select_psc_compat(void);
-const char *__init mpc512x_select_reset_compat(void);
extern void __noreturn mpc512x_restart(char *cmd);
#endif /* __MPC512X_H__ */
diff --git a/arch/powerpc/platforms/512x/mpc512x_shared.c b/arch/powerpc/platforms/512x/mpc512x_shared.c
index 5ac0ead2540f..8f75e9574c27 100644
--- a/arch/powerpc/platforms/512x/mpc512x_shared.c
+++ b/arch/powerpc/platforms/512x/mpc512x_shared.c
@@ -29,20 +29,6 @@
static struct mpc512x_reset_module __iomem *reset_module_base;
-static void __init mpc512x_restart_init(void)
-{
- struct device_node *np;
- const char *reset_compat;
-
- reset_compat = mpc512x_select_reset_compat();
- np = of_find_compatible_node(NULL, NULL, reset_compat);
- if (!np)
- return;
-
- reset_module_base = of_iomap(np, 0);
- of_node_put(np);
-}
-
void __noreturn mpc512x_restart(char *cmd)
{
if (reset_module_base) {
@@ -363,7 +349,7 @@ const char *__init mpc512x_select_psc_compat(void)
return NULL;
}
-const char *__init mpc512x_select_reset_compat(void)
+static const char *__init mpc512x_select_reset_compat(void)
{
if (of_machine_is_compatible("fsl,mpc5121"))
return "fsl,mpc5121-reset";
@@ -455,6 +441,20 @@ static void __init mpc512x_psc_fifo_init(void)
}
}
+static void __init mpc512x_restart_init(void)
+{
+ struct device_node *np;
+ const char *reset_compat;
+
+ reset_compat = mpc512x_select_reset_compat();
+ np = of_find_compatible_node(NULL, NULL, reset_compat);
+ if (!np)
+ return;
+
+ reset_module_base = of_iomap(np, 0);
+ of_node_put(np);
+}
+
void __init mpc512x_init_early(void)
{
mpc512x_restart_init();
--
2.41.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] powerpc/512x: Make mpc512x_select_reset_compat() static
2023-08-18 6:51 [PATCH v2] powerpc/512x: Make mpc512x_select_reset_compat() static Christophe Leroy
@ 2023-08-23 11:55 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2023-08-23 11:55 UTC (permalink / raw)
To: Nicholas Piggin, Christophe Leroy; +Cc: linuxppc-dev, linux-kernel
On Fri, 18 Aug 2023 08:51:48 +0200, Christophe Leroy wrote:
> mpc512x_select_reset_compat() is only used in the file it
> is defined.
>
> Make it static.
>
> Move mpc512x_restart_init() after mpc512x_select_reset_compat().
>
> [...]
Applied to powerpc/next.
[1/1] powerpc/512x: Make mpc512x_select_reset_compat() static
https://git.kernel.org/powerpc/c/be922070d0914c6642256ceec6b7be75c0a5ddf3
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-08-23 12:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-18 6:51 [PATCH v2] powerpc/512x: Make mpc512x_select_reset_compat() static Christophe Leroy
2023-08-23 11:55 ` Michael Ellerman
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).