* [RESEND PATCH 1/2] powerpc/powermac: add missing g5_phy_disable_cpu1() declaration @ 2021-09-22 8:44 Krzysztof Kozlowski 2021-09-22 8:44 ` [RESEND PATCH 2/2] powerpc/powermac: constify device_node in of_irq_parse_oldworld() Krzysztof Kozlowski 2021-09-22 13:52 ` [RESEND PATCH 1/2] powerpc/powermac: add missing g5_phy_disable_cpu1() declaration Christophe Leroy 0 siblings, 2 replies; 6+ messages in thread From: Krzysztof Kozlowski @ 2021-09-22 8:44 UTC (permalink / raw) To: Michael Ellerman, Benjamin Herrenschmidt, Paul Mackerras, Rob Herring, Frank Rowand, Krzysztof Kozlowski, 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> --- arch/powerpc/include/asm/pmac_feature.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/powerpc/include/asm/pmac_feature.h b/arch/powerpc/include/asm/pmac_feature.h index e08e829261b6..7703e5bf1203 100644 --- a/arch/powerpc/include/asm/pmac_feature.h +++ b/arch/powerpc/include/asm/pmac_feature.h @@ -143,6 +143,10 @@ */ struct device_node; +#ifdef CONFIG_PPC64 +void g5_phy_disable_cpu1(void); +#endif /* CONFIG_PPC64 */ + static inline long pmac_call_feature(int selector, struct device_node* node, long param, long value) { -- 2.30.2 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [RESEND PATCH 2/2] powerpc/powermac: constify device_node in of_irq_parse_oldworld() 2021-09-22 8:44 [RESEND PATCH 1/2] powerpc/powermac: add missing g5_phy_disable_cpu1() declaration Krzysztof Kozlowski @ 2021-09-22 8:44 ` Krzysztof Kozlowski 2021-09-22 13:55 ` Christophe Leroy 2021-09-22 13:52 ` [RESEND PATCH 1/2] powerpc/powermac: add missing g5_phy_disable_cpu1() declaration Christophe Leroy 1 sibling, 1 reply; 6+ messages in thread From: Krzysztof Kozlowski @ 2021-09-22 8:44 UTC (permalink / raw) To: Michael Ellerman, Benjamin Herrenschmidt, Paul Mackerras, Rob Herring, Frank Rowand, Krzysztof Kozlowski, 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. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> --- arch/powerpc/platforms/powermac/pic.c | 2 +- include/linux/of_irq.h | 4 ++-- 2 files changed, 3 insertions(+), 3 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..6074fdf51f0c 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, +extern 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] 6+ messages in thread
* Re: [RESEND PATCH 2/2] powerpc/powermac: constify device_node in of_irq_parse_oldworld() 2021-09-22 8:44 ` [RESEND PATCH 2/2] powerpc/powermac: constify device_node in of_irq_parse_oldworld() Krzysztof Kozlowski @ 2021-09-22 13:55 ` Christophe Leroy 2021-09-22 14:12 ` Krzysztof Kozlowski 0 siblings, 1 reply; 6+ messages in thread From: Christophe Leroy @ 2021-09-22 13:55 UTC (permalink / raw) To: Krzysztof Kozlowski, Michael Ellerman, Benjamin Herrenschmidt, Paul Mackerras, Rob Herring, Frank Rowand, linuxppc-dev, linux-kernel, devicetree Le 22/09/2021 à 10:44, Krzysztof Kozlowski a écrit : > The of_irq_parse_oldworld() does not modify passed device_node so make > it a pointer to const for safety. AFAIKS this patch is unrelated to previous one so you should send them out separately instead of sending as a series. > > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> > --- > arch/powerpc/platforms/powermac/pic.c | 2 +- > include/linux/of_irq.h | 4 ++-- > 2 files changed, 3 insertions(+), 3 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..6074fdf51f0c 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, > +extern int of_irq_parse_oldworld(const struct device_node *device, int index, > struct of_phandle_args *out_irq); Please remove 'extern' which is useless for prototypes. > #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; > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RESEND PATCH 2/2] powerpc/powermac: constify device_node in of_irq_parse_oldworld() 2021-09-22 13:55 ` Christophe Leroy @ 2021-09-22 14:12 ` Krzysztof Kozlowski 0 siblings, 0 replies; 6+ messages in thread From: Krzysztof Kozlowski @ 2021-09-22 14:12 UTC (permalink / raw) To: Christophe Leroy, Michael Ellerman, Benjamin Herrenschmidt, Paul Mackerras, Rob Herring, Frank Rowand, linuxppc-dev, linux-kernel, devicetree On 22/09/2021 15:55, Christophe Leroy wrote: > > > Le 22/09/2021 à 10:44, Krzysztof Kozlowski a écrit : >> The of_irq_parse_oldworld() does not modify passed device_node so make >> it a pointer to const for safety. > > AFAIKS this patch is unrelated to previous one so you should send them > out separately instead of sending as a series. The relation it's a series of bugfixes. Although they can be applied independently, having a series is actually very useful - you run "b4 am" on one message ID and get everything. The same with patchwork, if you use that one. > >> >> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> >> --- >> arch/powerpc/platforms/powermac/pic.c | 2 +- >> include/linux/of_irq.h | 4 ++-- >> 2 files changed, 3 insertions(+), 3 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..6074fdf51f0c 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, >> +extern int of_irq_parse_oldworld(const struct device_node *device, int index, >> struct of_phandle_args *out_irq); > > Please remove 'extern' which is useless for prototypes. OK Best regards, Krzysztof ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RESEND PATCH 1/2] powerpc/powermac: add missing g5_phy_disable_cpu1() declaration 2021-09-22 8:44 [RESEND PATCH 1/2] powerpc/powermac: add missing g5_phy_disable_cpu1() declaration Krzysztof Kozlowski 2021-09-22 8:44 ` [RESEND PATCH 2/2] powerpc/powermac: constify device_node in of_irq_parse_oldworld() Krzysztof Kozlowski @ 2021-09-22 13:52 ` Christophe Leroy 2021-09-22 14:10 ` Krzysztof Kozlowski 1 sibling, 1 reply; 6+ messages in thread From: Christophe Leroy @ 2021-09-22 13:52 UTC (permalink / raw) To: Krzysztof Kozlowski, Michael Ellerman, Benjamin Herrenschmidt, Paul Mackerras, Rob Herring, Frank Rowand, linuxppc-dev, linux-kernel, devicetree Le 22/09/2021 à 10:44, Krzysztof Kozlowski a écrit : > 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] While you are at it, can you clean it up completely, that is remove the declaration in arch/powerpc/platforms/powermac/smp.c ? > > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> > --- > arch/powerpc/include/asm/pmac_feature.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/arch/powerpc/include/asm/pmac_feature.h b/arch/powerpc/include/asm/pmac_feature.h > index e08e829261b6..7703e5bf1203 100644 > --- a/arch/powerpc/include/asm/pmac_feature.h > +++ b/arch/powerpc/include/asm/pmac_feature.h > @@ -143,6 +143,10 @@ > */ > struct device_node; > > +#ifdef CONFIG_PPC64 > +void g5_phy_disable_cpu1(void); > +#endif /* CONFIG_PPC64 */ > + > static inline long pmac_call_feature(int selector, struct device_node* node, > long param, long value) > { > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RESEND PATCH 1/2] powerpc/powermac: add missing g5_phy_disable_cpu1() declaration 2021-09-22 13:52 ` [RESEND PATCH 1/2] powerpc/powermac: add missing g5_phy_disable_cpu1() declaration Christophe Leroy @ 2021-09-22 14:10 ` Krzysztof Kozlowski 0 siblings, 0 replies; 6+ messages in thread From: Krzysztof Kozlowski @ 2021-09-22 14:10 UTC (permalink / raw) To: Christophe Leroy, Michael Ellerman, Benjamin Herrenschmidt, Paul Mackerras, Rob Herring, Frank Rowand, linuxppc-dev, linux-kernel, devicetree On 22/09/2021 15:52, Christophe Leroy wrote: > > > Le 22/09/2021 à 10:44, Krzysztof Kozlowski a écrit : >> 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] > > > While you are at it, can you clean it up completely, that is remove the > declaration in arch/powerpc/platforms/powermac/smp.c ? > Sure, I'll send a v2. Thanks for pointing this out. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-09-22 14:12 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-09-22 8:44 [RESEND PATCH 1/2] powerpc/powermac: add missing g5_phy_disable_cpu1() declaration Krzysztof Kozlowski 2021-09-22 8:44 ` [RESEND PATCH 2/2] powerpc/powermac: constify device_node in of_irq_parse_oldworld() Krzysztof Kozlowski 2021-09-22 13:55 ` Christophe Leroy 2021-09-22 14:12 ` Krzysztof Kozlowski 2021-09-22 13:52 ` [RESEND PATCH 1/2] powerpc/powermac: add missing g5_phy_disable_cpu1() declaration Christophe Leroy 2021-09-22 14:10 ` Krzysztof Kozlowski
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.