* [PATCH v3 1/2] powerpc/powermac: add missing g5_phy_disable_cpu1() declaration
@ 2021-09-24 10:56 Krzysztof Kozlowski
2021-09-24 10:56 ` [PATCH v3 2/2] powerpc/powermac: constify device_node in of_irq_parse_oldworld() Krzysztof Kozlowski
2022-05-24 11:09 ` [PATCH v3 1/2] powerpc/powermac: add missing g5_phy_disable_cpu1() declaration Michael Ellerman
0 siblings, 2 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2021-09-24 10:56 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Michael Ellerman, Paul Mackerras,
Rob Herring, Frank Rowand, Krzysztof Kozlowski, Christophe Leroy,
linuxppc-dev, linux-kernel, devicetree
g5_phy_disable_cpu1() is used outside of platforms/powermac/feature.c,
so it should have a declaration to fix W=1 warning:
arch/powerpc/platforms/powermac/feature.c:1533:6:
error: no previous prototype for ‘g5_phy_disable_cpu1’ [-Werror=missing-prototypes]
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
---
Changes since v2:
1. Put declaration in powermac/pmac.h
Changes since v1:
1. Drop declaration in powermac/smp.c
---
arch/powerpc/platforms/powermac/pmac.h | 2 ++
arch/powerpc/platforms/powermac/smp.c | 2 --
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/platforms/powermac/pmac.h b/arch/powerpc/platforms/powermac/pmac.h
index 0d715db434dc..be528e0e507f 100644
--- a/arch/powerpc/platforms/powermac/pmac.h
+++ b/arch/powerpc/platforms/powermac/pmac.h
@@ -14,6 +14,8 @@ struct rtc_time;
extern int pmac_newworld;
+void g5_phy_disable_cpu1(void);
+
extern long pmac_time_init(void);
extern time64_t pmac_get_boot_time(void);
extern void pmac_get_rtc_time(struct rtc_time *);
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c
index 3256a316e884..5d0626f432d5 100644
--- a/arch/powerpc/platforms/powermac/smp.c
+++ b/arch/powerpc/platforms/powermac/smp.c
@@ -875,8 +875,6 @@ static int smp_core99_cpu_online(unsigned int cpu)
static void __init smp_core99_bringup_done(void)
{
- extern void g5_phy_disable_cpu1(void);
-
/* Close i2c bus if it was used for tb sync */
if (pmac_tb_clock_chip_host)
pmac_i2c_close(pmac_tb_clock_chip_host);
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v3 2/2] powerpc/powermac: constify device_node in of_irq_parse_oldworld()
2021-09-24 10:56 [PATCH v3 1/2] powerpc/powermac: add missing g5_phy_disable_cpu1() declaration Krzysztof Kozlowski
@ 2021-09-24 10:56 ` Krzysztof Kozlowski
2021-10-04 17:00 ` Rob Herring
2022-05-24 11:09 ` [PATCH v3 1/2] powerpc/powermac: add missing g5_phy_disable_cpu1() declaration Michael Ellerman
1 sibling, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2021-09-24 10:56 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Michael Ellerman, Paul Mackerras,
Rob Herring, Frank Rowand, Krzysztof Kozlowski, Christophe Leroy,
linuxppc-dev, linux-kernel, devicetree
The of_irq_parse_oldworld() does not modify passed device_node so make
it a pointer to const for safety. Drop the extern while modifying the
line.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
---
Changes since v1:
1. Drop extern.
---
arch/powerpc/platforms/powermac/pic.c | 2 +-
include/linux/of_irq.h | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c
index 4921bccf0376..af5ca1f41bb1 100644
--- a/arch/powerpc/platforms/powermac/pic.c
+++ b/arch/powerpc/platforms/powermac/pic.c
@@ -384,7 +384,7 @@ static void __init pmac_pic_probe_oldstyle(void)
#endif
}
-int of_irq_parse_oldworld(struct device_node *device, int index,
+int of_irq_parse_oldworld(const struct device_node *device, int index,
struct of_phandle_args *out_irq)
{
const u32 *ints = NULL;
diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h
index aaf219bd0354..83fccd0c9bba 100644
--- a/include/linux/of_irq.h
+++ b/include/linux/of_irq.h
@@ -20,12 +20,12 @@ typedef int (*of_irq_init_cb_t)(struct device_node *, struct device_node *);
#if defined(CONFIG_PPC32) && defined(CONFIG_PPC_PMAC)
extern unsigned int of_irq_workarounds;
extern struct device_node *of_irq_dflt_pic;
-extern int of_irq_parse_oldworld(struct device_node *device, int index,
- struct of_phandle_args *out_irq);
+int of_irq_parse_oldworld(const struct device_node *device, int index,
+ struct of_phandle_args *out_irq);
#else /* CONFIG_PPC32 && CONFIG_PPC_PMAC */
#define of_irq_workarounds (0)
#define of_irq_dflt_pic (NULL)
-static inline int of_irq_parse_oldworld(struct device_node *device, int index,
+static inline int of_irq_parse_oldworld(const struct device_node *device, int index,
struct of_phandle_args *out_irq)
{
return -EINVAL;
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v3 2/2] powerpc/powermac: constify device_node in of_irq_parse_oldworld()
2021-09-24 10:56 ` [PATCH v3 2/2] powerpc/powermac: constify device_node in of_irq_parse_oldworld() Krzysztof Kozlowski
@ 2021-10-04 17:00 ` Rob Herring
0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2021-10-04 17:00 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: devicetree, Michael Ellerman, Rob Herring, Christophe Leroy,
linuxppc-dev, Frank Rowand, Paul Mackerras, linux-kernel,
Benjamin Herrenschmidt
On Fri, 24 Sep 2021 12:56:53 +0200, Krzysztof Kozlowski wrote:
> The of_irq_parse_oldworld() does not modify passed device_node so make
> it a pointer to const for safety. Drop the extern while modifying the
> line.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
>
> ---
>
> Changes since v1:
> 1. Drop extern.
> ---
> arch/powerpc/platforms/powermac/pic.c | 2 +-
> include/linux/of_irq.h | 6 +++---
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
Acked-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3 1/2] powerpc/powermac: add missing g5_phy_disable_cpu1() declaration
2021-09-24 10:56 [PATCH v3 1/2] powerpc/powermac: add missing g5_phy_disable_cpu1() declaration Krzysztof Kozlowski
2021-09-24 10:56 ` [PATCH v3 2/2] powerpc/powermac: constify device_node in of_irq_parse_oldworld() Krzysztof Kozlowski
@ 2022-05-24 11:09 ` Michael Ellerman
1 sibling, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2022-05-24 11:09 UTC (permalink / raw)
To: devicetree, linux-kernel, Frank Rowand, Krzysztof Kozlowski,
Michael Ellerman, Christophe Leroy, Benjamin Herrenschmidt,
Rob Herring, Paul Mackerras, linuxppc-dev
On Fri, 24 Sep 2021 12:56:52 +0200, Krzysztof Kozlowski wrote:
> g5_phy_disable_cpu1() is used outside of platforms/powermac/feature.c,
> so it should have a declaration to fix W=1 warning:
>
> arch/powerpc/platforms/powermac/feature.c:1533:6:
> error: no previous prototype for ‘g5_phy_disable_cpu1’ [-Werror=missing-prototypes]
>
>
> [...]
Applied to powerpc/next.
[1/2] powerpc/powermac: add missing g5_phy_disable_cpu1() declaration
https://git.kernel.org/powerpc/c/cc025916b12a452df7932da528d25b2ef2b05072
[2/2] powerpc/powermac: constify device_node in of_irq_parse_oldworld()
https://git.kernel.org/powerpc/c/bb12dd42d20f5513a8d1da225232af0a0743fd79
cheers
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-05-24 11:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-24 10:56 [PATCH v3 1/2] powerpc/powermac: add missing g5_phy_disable_cpu1() declaration Krzysztof Kozlowski
2021-09-24 10:56 ` [PATCH v3 2/2] powerpc/powermac: constify device_node in of_irq_parse_oldworld() Krzysztof Kozlowski
2021-10-04 17:00 ` Rob Herring
2022-05-24 11:09 ` [PATCH v3 1/2] powerpc/powermac: add missing g5_phy_disable_cpu1() declaration 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).