* [PATCH 1/6] powerpc/85xx: Fix no previous prototype warning for mpc85xx_setup_pmc()
@ 2021-11-24 9:32 Michael Ellerman
2021-11-24 9:32 ` [PATCH 2/6] powerpc/85xx: Make mpc85xx_smp_kexec_cpu_down() static Michael Ellerman
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Michael Ellerman @ 2021-11-24 9:32 UTC (permalink / raw)
To: linuxppc-dev
Fixes the following W=1 warning:
arch/powerpc/platforms/85xx/mpc85xx_pm_ops.c:89:12: warning: no previous prototype for 'mpc85xx_setup_pmc'
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
arch/powerpc/platforms/85xx/mpc85xx_pm_ops.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_pm_ops.c b/arch/powerpc/platforms/85xx/mpc85xx_pm_ops.c
index 4a8af80011a6..f7ac92a8ae97 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_pm_ops.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_pm_ops.c
@@ -15,6 +15,8 @@
#include <asm/io.h>
#include <asm/fsl_pm.h>
+#include "smp.h"
+
static struct ccsr_guts __iomem *guts;
#ifdef CONFIG_FSL_PMC
--
2.31.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/6] powerpc/85xx: Make mpc85xx_smp_kexec_cpu_down() static
2021-11-24 9:32 [PATCH 1/6] powerpc/85xx: Fix no previous prototype warning for mpc85xx_setup_pmc() Michael Ellerman
@ 2021-11-24 9:32 ` Michael Ellerman
2021-11-24 9:32 ` [PATCH 3/6] powerpc/85xx: Make c293_pcie_pic_init() static Michael Ellerman
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Michael Ellerman @ 2021-11-24 9:32 UTC (permalink / raw)
To: linuxppc-dev
To fix the W=1 warning:
arch/powerpc/platforms/85xx/smp.c:369:6: error: no previous prototype for ‘mpc85xx_smp_kexec_cpu_down’
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
arch/powerpc/platforms/85xx/smp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/platforms/85xx/smp.c b/arch/powerpc/platforms/85xx/smp.c
index 83f4a6389a28..0abc1da2c14f 100644
--- a/arch/powerpc/platforms/85xx/smp.c
+++ b/arch/powerpc/platforms/85xx/smp.c
@@ -366,7 +366,7 @@ struct smp_ops_t smp_85xx_ops = {
#ifdef CONFIG_PPC32
atomic_t kexec_down_cpus = ATOMIC_INIT(0);
-void mpc85xx_smp_kexec_cpu_down(int crash_shutdown, int secondary)
+static void mpc85xx_smp_kexec_cpu_down(int crash_shutdown, int secondary)
{
local_irq_disable();
@@ -384,7 +384,7 @@ static void mpc85xx_smp_kexec_down(void *arg)
ppc_md.kexec_cpu_down(0,1);
}
#else
-void mpc85xx_smp_kexec_cpu_down(int crash_shutdown, int secondary)
+static void mpc85xx_smp_kexec_cpu_down(int crash_shutdown, int secondary)
{
int cpu = smp_processor_id();
int sibling = cpu_last_thread_sibling(cpu);
--
2.31.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/6] powerpc/85xx: Make c293_pcie_pic_init() static
2021-11-24 9:32 [PATCH 1/6] powerpc/85xx: Fix no previous prototype warning for mpc85xx_setup_pmc() Michael Ellerman
2021-11-24 9:32 ` [PATCH 2/6] powerpc/85xx: Make mpc85xx_smp_kexec_cpu_down() static Michael Ellerman
@ 2021-11-24 9:32 ` Michael Ellerman
2021-11-24 9:32 ` [PATCH 4/6] powerpc/mm: Move tlbcam_sz() and make it static Michael Ellerman
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Michael Ellerman @ 2021-11-24 9:32 UTC (permalink / raw)
To: linuxppc-dev
To fix the W=1 warning:
linux/arch/powerpc/platforms/85xx/c293pcie.c:22:13: error: no previous prototype for ‘c293_pcie_pic_init’
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
arch/powerpc/platforms/85xx/c293pcie.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/85xx/c293pcie.c b/arch/powerpc/platforms/85xx/c293pcie.c
index 8d9a2503dd0f..58a398c89e97 100644
--- a/arch/powerpc/platforms/85xx/c293pcie.c
+++ b/arch/powerpc/platforms/85xx/c293pcie.c
@@ -19,7 +19,7 @@
#include "mpc85xx.h"
-void __init c293_pcie_pic_init(void)
+static void __init c293_pcie_pic_init(void)
{
struct mpic *mpic = mpic_alloc(NULL, 0, MPIC_BIG_ENDIAN |
MPIC_SINGLE_DEST_CPU, 0, 256, " OpenPIC ");
--
2.31.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/6] powerpc/mm: Move tlbcam_sz() and make it static
2021-11-24 9:32 [PATCH 1/6] powerpc/85xx: Fix no previous prototype warning for mpc85xx_setup_pmc() Michael Ellerman
2021-11-24 9:32 ` [PATCH 2/6] powerpc/85xx: Make mpc85xx_smp_kexec_cpu_down() static Michael Ellerman
2021-11-24 9:32 ` [PATCH 3/6] powerpc/85xx: Make c293_pcie_pic_init() static Michael Ellerman
@ 2021-11-24 9:32 ` Michael Ellerman
2021-11-24 9:32 ` [PATCH 5/6] powerpc/smp: Move setup_profiling_timer() under CONFIG_PROFILING Michael Ellerman
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Michael Ellerman @ 2021-11-24 9:32 UTC (permalink / raw)
To: linuxppc-dev
Building with W=1 we see a warning:
linux/arch/powerpc/mm/nohash/fsl_book3e.c:63:15: error: no previous prototype for ‘tlbcam_sz’
tlbcam_sz() is not used outside this file, so we can make it static.
However it's only used inside #ifdef CONFIG_PPC32, so move it within
that ifdef, otherwise we would get a defined but not used error.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
arch/powerpc/mm/nohash/fsl_book3e.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/powerpc/mm/nohash/fsl_book3e.c b/arch/powerpc/mm/nohash/fsl_book3e.c
index b231a54f540c..7f71bc3bf85f 100644
--- a/arch/powerpc/mm/nohash/fsl_book3e.c
+++ b/arch/powerpc/mm/nohash/fsl_book3e.c
@@ -60,11 +60,6 @@ struct tlbcamrange {
phys_addr_t phys;
} tlbcam_addrs[NUM_TLBCAMS];
-unsigned long tlbcam_sz(int idx)
-{
- return tlbcam_addrs[idx].limit - tlbcam_addrs[idx].start + 1;
-}
-
#ifdef CONFIG_FSL_BOOKE
/*
* Return PA for this VA if it is mapped by a CAM, or 0
@@ -264,6 +259,11 @@ void __init MMU_init_hw(void)
flush_instruction_cache();
}
+static unsigned long tlbcam_sz(int idx)
+{
+ return tlbcam_addrs[idx].limit - tlbcam_addrs[idx].start + 1;
+}
+
void __init adjust_total_lowmem(void)
{
unsigned long ram;
--
2.31.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 5/6] powerpc/smp: Move setup_profiling_timer() under CONFIG_PROFILING
2021-11-24 9:32 [PATCH 1/6] powerpc/85xx: Fix no previous prototype warning for mpc85xx_setup_pmc() Michael Ellerman
` (2 preceding siblings ...)
2021-11-24 9:32 ` [PATCH 4/6] powerpc/mm: Move tlbcam_sz() and make it static Michael Ellerman
@ 2021-11-24 9:32 ` Michael Ellerman
2021-11-24 9:32 ` [PATCH 6/6] powerpc: Mark probe_machine() __init and static Michael Ellerman
2021-12-07 13:26 ` [PATCH 1/6] powerpc/85xx: Fix no previous prototype warning for mpc85xx_setup_pmc() Michael Ellerman
5 siblings, 0 replies; 7+ messages in thread
From: Michael Ellerman @ 2021-11-24 9:32 UTC (permalink / raw)
To: linuxppc-dev
setup_profiling_timer() is only needed when CONFIG_PROFILING is enabled.
Fixes the following W=1 warning when CONFIG_PROFILING=n:
linux/arch/powerpc/kernel/smp.c:1638:5: error: no previous prototype for ‘setup_profiling_timer’
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
arch/powerpc/kernel/smp.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index c23ee842c4c3..aee3a7119f97 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -1635,10 +1635,12 @@ void start_secondary(void *unused)
BUG();
}
+#ifdef CONFIG_PROFILING
int setup_profiling_timer(unsigned int multiplier)
{
return 0;
}
+#endif
static void fixup_topology(void)
{
--
2.31.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 6/6] powerpc: Mark probe_machine() __init and static
2021-11-24 9:32 [PATCH 1/6] powerpc/85xx: Fix no previous prototype warning for mpc85xx_setup_pmc() Michael Ellerman
` (3 preceding siblings ...)
2021-11-24 9:32 ` [PATCH 5/6] powerpc/smp: Move setup_profiling_timer() under CONFIG_PROFILING Michael Ellerman
@ 2021-11-24 9:32 ` Michael Ellerman
2021-12-07 13:26 ` [PATCH 1/6] powerpc/85xx: Fix no previous prototype warning for mpc85xx_setup_pmc() Michael Ellerman
5 siblings, 0 replies; 7+ messages in thread
From: Michael Ellerman @ 2021-11-24 9:32 UTC (permalink / raw)
To: linuxppc-dev
Prior to commit b1923caa6e64 ("powerpc: Merge 32-bit and 64-bit
setup_arch()") probe_machine() was called from setup_32/64.c and lived
in setup-common.c. But now it's only called from setup-common.c so it
can be static and __init, and we don't need the declaration in
machdep.h either.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
arch/powerpc/include/asm/machdep.h | 2 --
arch/powerpc/kernel/setup-common.c | 2 +-
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/powerpc/include/asm/machdep.h b/arch/powerpc/include/asm/machdep.h
index 9c3c9f04129f..e821037f74f0 100644
--- a/arch/powerpc/include/asm/machdep.h
+++ b/arch/powerpc/include/asm/machdep.h
@@ -235,8 +235,6 @@ extern struct machdep_calls *machine_id;
machine_id == &mach_##name; \
})
-extern void probe_machine(void);
-
#ifdef CONFIG_PPC_PMAC
/*
* Power macintoshes have either a CUDA, PMU or SMU controlling
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 4f1322b65760..f8da937df918 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -582,7 +582,7 @@ static __init int add_pcspkr(void)
device_initcall(add_pcspkr);
#endif /* CONFIG_PCSPKR_PLATFORM */
-void probe_machine(void)
+static __init void probe_machine(void)
{
extern struct machdep_calls __machine_desc_start;
extern struct machdep_calls __machine_desc_end;
--
2.31.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/6] powerpc/85xx: Fix no previous prototype warning for mpc85xx_setup_pmc()
2021-11-24 9:32 [PATCH 1/6] powerpc/85xx: Fix no previous prototype warning for mpc85xx_setup_pmc() Michael Ellerman
` (4 preceding siblings ...)
2021-11-24 9:32 ` [PATCH 6/6] powerpc: Mark probe_machine() __init and static Michael Ellerman
@ 2021-12-07 13:26 ` Michael Ellerman
5 siblings, 0 replies; 7+ messages in thread
From: Michael Ellerman @ 2021-12-07 13:26 UTC (permalink / raw)
To: linuxppc-dev, Michael Ellerman
On Wed, 24 Nov 2021 20:32:49 +1100, Michael Ellerman wrote:
> Fixes the following W=1 warning:
> arch/powerpc/platforms/85xx/mpc85xx_pm_ops.c:89:12: warning: no previous prototype for 'mpc85xx_setup_pmc'
>
>
Applied to powerpc/next.
[1/6] powerpc/85xx: Fix no previous prototype warning for mpc85xx_setup_pmc()
https://git.kernel.org/powerpc/c/4ea9e321c27fd531a8dfe0fa1d1b2ee15fc3444e
[2/6] powerpc/85xx: Make mpc85xx_smp_kexec_cpu_down() static
https://git.kernel.org/powerpc/c/84a61fb43fdfc528a3a7ff00e0b14ba91f5eb745
[3/6] powerpc/85xx: Make c293_pcie_pic_init() static
https://git.kernel.org/powerpc/c/d9150d5bb5586dc20b6c424e59d5ea29fe1b3030
[4/6] powerpc/mm: Move tlbcam_sz() and make it static
https://git.kernel.org/powerpc/c/ff47a95d1a67477e9bc2049a840d93b68508e079
[5/6] powerpc/smp: Move setup_profiling_timer() under CONFIG_PROFILING
https://git.kernel.org/powerpc/c/a4ac0d249a5db80e79d573db9e4ad29354b643a8
[6/6] powerpc: Mark probe_machine() __init and static
https://git.kernel.org/powerpc/c/ab85a273957eadfcf7906bcd8a0adf5909d802ee
cheers
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-12-07 13:32 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-24 9:32 [PATCH 1/6] powerpc/85xx: Fix no previous prototype warning for mpc85xx_setup_pmc() Michael Ellerman
2021-11-24 9:32 ` [PATCH 2/6] powerpc/85xx: Make mpc85xx_smp_kexec_cpu_down() static Michael Ellerman
2021-11-24 9:32 ` [PATCH 3/6] powerpc/85xx: Make c293_pcie_pic_init() static Michael Ellerman
2021-11-24 9:32 ` [PATCH 4/6] powerpc/mm: Move tlbcam_sz() and make it static Michael Ellerman
2021-11-24 9:32 ` [PATCH 5/6] powerpc/smp: Move setup_profiling_timer() under CONFIG_PROFILING Michael Ellerman
2021-11-24 9:32 ` [PATCH 6/6] powerpc: Mark probe_machine() __init and static Michael Ellerman
2021-12-07 13:26 ` [PATCH 1/6] powerpc/85xx: Fix no previous prototype warning for mpc85xx_setup_pmc() Michael Ellerman
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.