All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc: Make some functions static
@ 2019-03-12 20:31 ` Mathieu Malaterre
  0 siblings, 0 replies; 18+ messages in thread
From: Mathieu Malaterre @ 2019-03-12 20:31 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: Mathieu Malaterre, Benjamin Herrenschmidt, Paul Mackerras,
	linuxppc-dev, linux-kernel

In commit cb9e4d10c448 ("[POWERPC] Add support for 750CL Holly board")
new functions were added. Since these functions can be made static,
make it so. While doing so, it turns out that holly_power_off and
holly_halt are unused, so remove them.

Silence the following warnings triggered using W=1:

  arch/powerpc/platforms/embedded6xx/holly.c:47:5: error: no previous prototype for 'holly_exclude_device' [-Werror=missing-prototypes]
  arch/powerpc/platforms/embedded6xx/holly.c:190:6: error: no previous prototype for 'holly_show_cpuinfo' [-Werror=missing-prototypes]
  arch/powerpc/platforms/embedded6xx/holly.c:196:17: error: no previous prototype for 'holly_restart' [-Werror=missing-prototypes]
  arch/powerpc/platforms/embedded6xx/holly.c:236:6: error: no previous prototype for 'holly_power_off' [-Werror=missing-prototypes]
  arch/powerpc/platforms/embedded6xx/holly.c:243:6: error: no previous prototype for 'holly_halt' [-Werror=missing-prototypes]

Signed-off-by: Mathieu Malaterre <malat@debian.org>
---
 arch/powerpc/platforms/embedded6xx/holly.c | 19 ++++---------------
 1 file changed, 4 insertions(+), 15 deletions(-)

diff --git a/arch/powerpc/platforms/embedded6xx/holly.c b/arch/powerpc/platforms/embedded6xx/holly.c
index 0409714e8070..829bf3697dc9 100644
--- a/arch/powerpc/platforms/embedded6xx/holly.c
+++ b/arch/powerpc/platforms/embedded6xx/holly.c
@@ -44,7 +44,8 @@
 
 #define HOLLY_PCI_CFG_PHYS 0x7c000000
 
-int holly_exclude_device(struct pci_controller *hose, u_char bus, u_char devfn)
+static int holly_exclude_device(struct pci_controller *hose, u_char bus,
+				u_char devfn)
 {
 	if (bus == 0 && PCI_SLOT(devfn) == 0)
 		return PCIBIOS_DEVICE_NOT_FOUND;
@@ -187,13 +188,13 @@ static void __init holly_init_IRQ(void)
 	tsi108_write_reg(TSI108_MPIC_OFFSET + 0x30c, 0);
 }
 
-void holly_show_cpuinfo(struct seq_file *m)
+static void holly_show_cpuinfo(struct seq_file *m)
 {
 	seq_printf(m, "vendor\t\t: IBM\n");
 	seq_printf(m, "machine\t\t: PPC750 GX/CL\n");
 }
 
-void __noreturn holly_restart(char *cmd)
+static void __noreturn holly_restart(char *cmd)
 {
 	__be32 __iomem *ocn_bar1 = NULL;
 	unsigned long bar;
@@ -233,18 +234,6 @@ void __noreturn holly_restart(char *cmd)
 	for (;;) ;
 }
 
-void holly_power_off(void)
-{
-	local_irq_disable();
-	/* No way to shut power off with software */
-	for (;;) ;
-}
-
-void holly_halt(void)
-{
-	holly_power_off();
-}
-
 /*
  * Called very early, device-tree isn't unflattened
  */
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH] powerpc: Make some functions static
@ 2019-03-12 20:31 ` Mathieu Malaterre
  0 siblings, 0 replies; 18+ messages in thread
From: Mathieu Malaterre @ 2019-03-12 20:31 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: Mathieu Malaterre, Paul Mackerras, linuxppc-dev, linux-kernel

In commit cb9e4d10c448 ("[POWERPC] Add support for 750CL Holly board")
new functions were added. Since these functions can be made static,
make it so. While doing so, it turns out that holly_power_off and
holly_halt are unused, so remove them.

Silence the following warnings triggered using W=1:

  arch/powerpc/platforms/embedded6xx/holly.c:47:5: error: no previous prototype for 'holly_exclude_device' [-Werror=missing-prototypes]
  arch/powerpc/platforms/embedded6xx/holly.c:190:6: error: no previous prototype for 'holly_show_cpuinfo' [-Werror=missing-prototypes]
  arch/powerpc/platforms/embedded6xx/holly.c:196:17: error: no previous prototype for 'holly_restart' [-Werror=missing-prototypes]
  arch/powerpc/platforms/embedded6xx/holly.c:236:6: error: no previous prototype for 'holly_power_off' [-Werror=missing-prototypes]
  arch/powerpc/platforms/embedded6xx/holly.c:243:6: error: no previous prototype for 'holly_halt' [-Werror=missing-prototypes]

Signed-off-by: Mathieu Malaterre <malat@debian.org>
---
 arch/powerpc/platforms/embedded6xx/holly.c | 19 ++++---------------
 1 file changed, 4 insertions(+), 15 deletions(-)

diff --git a/arch/powerpc/platforms/embedded6xx/holly.c b/arch/powerpc/platforms/embedded6xx/holly.c
index 0409714e8070..829bf3697dc9 100644
--- a/arch/powerpc/platforms/embedded6xx/holly.c
+++ b/arch/powerpc/platforms/embedded6xx/holly.c
@@ -44,7 +44,8 @@
 
 #define HOLLY_PCI_CFG_PHYS 0x7c000000
 
-int holly_exclude_device(struct pci_controller *hose, u_char bus, u_char devfn)
+static int holly_exclude_device(struct pci_controller *hose, u_char bus,
+				u_char devfn)
 {
 	if (bus == 0 && PCI_SLOT(devfn) == 0)
 		return PCIBIOS_DEVICE_NOT_FOUND;
@@ -187,13 +188,13 @@ static void __init holly_init_IRQ(void)
 	tsi108_write_reg(TSI108_MPIC_OFFSET + 0x30c, 0);
 }
 
-void holly_show_cpuinfo(struct seq_file *m)
+static void holly_show_cpuinfo(struct seq_file *m)
 {
 	seq_printf(m, "vendor\t\t: IBM\n");
 	seq_printf(m, "machine\t\t: PPC750 GX/CL\n");
 }
 
-void __noreturn holly_restart(char *cmd)
+static void __noreturn holly_restart(char *cmd)
 {
 	__be32 __iomem *ocn_bar1 = NULL;
 	unsigned long bar;
@@ -233,18 +234,6 @@ void __noreturn holly_restart(char *cmd)
 	for (;;) ;
 }
 
-void holly_power_off(void)
-{
-	local_irq_disable();
-	/* No way to shut power off with software */
-	for (;;) ;
-}
-
-void holly_halt(void)
-{
-	holly_power_off();
-}
-
 /*
  * Called very early, device-tree isn't unflattened
  */
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH] powerpc: Make some functions static
  2019-03-12 20:31 ` Mathieu Malaterre
@ 2019-03-12 21:14   ` Christophe Leroy
  -1 siblings, 0 replies; 18+ messages in thread
From: Christophe Leroy @ 2019-03-12 21:14 UTC (permalink / raw)
  To: Mathieu Malaterre, Michael Ellerman
  Cc: Paul Mackerras, linuxppc-dev, linux-kernel



Le 12/03/2019 à 21:31, Mathieu Malaterre a écrit :
> In commit cb9e4d10c448 ("[POWERPC] Add support for 750CL Holly board")
> new functions were added. Since these functions can be made static,
> make it so. While doing so, it turns out that holly_power_off and
> holly_halt are unused, so remove them.

I would have said 'since these functions are only used in this C file, 
make them static'.

I think this could be split in two patches:
1/ Remove unused functions, ie holly_halt() and holly_power_off().
2/ Make the other ones static.

Christophe

> 
> Silence the following warnings triggered using W=1:
> 
>    arch/powerpc/platforms/embedded6xx/holly.c:47:5: error: no previous prototype for 'holly_exclude_device' [-Werror=missing-prototypes]
>    arch/powerpc/platforms/embedded6xx/holly.c:190:6: error: no previous prototype for 'holly_show_cpuinfo' [-Werror=missing-prototypes]
>    arch/powerpc/platforms/embedded6xx/holly.c:196:17: error: no previous prototype for 'holly_restart' [-Werror=missing-prototypes]
>    arch/powerpc/platforms/embedded6xx/holly.c:236:6: error: no previous prototype for 'holly_power_off' [-Werror=missing-prototypes]
>    arch/powerpc/platforms/embedded6xx/holly.c:243:6: error: no previous prototype for 'holly_halt' [-Werror=missing-prototypes]
> 
> Signed-off-by: Mathieu Malaterre <malat@debian.org>
> ---
>   arch/powerpc/platforms/embedded6xx/holly.c | 19 ++++---------------
>   1 file changed, 4 insertions(+), 15 deletions(-)
> 
> diff --git a/arch/powerpc/platforms/embedded6xx/holly.c b/arch/powerpc/platforms/embedded6xx/holly.c
> index 0409714e8070..829bf3697dc9 100644
> --- a/arch/powerpc/platforms/embedded6xx/holly.c
> +++ b/arch/powerpc/platforms/embedded6xx/holly.c
> @@ -44,7 +44,8 @@
>   
>   #define HOLLY_PCI_CFG_PHYS 0x7c000000
>   
> -int holly_exclude_device(struct pci_controller *hose, u_char bus, u_char devfn)
> +static int holly_exclude_device(struct pci_controller *hose, u_char bus,
> +				u_char devfn)
>   {
>   	if (bus == 0 && PCI_SLOT(devfn) == 0)
>   		return PCIBIOS_DEVICE_NOT_FOUND;
> @@ -187,13 +188,13 @@ static void __init holly_init_IRQ(void)
>   	tsi108_write_reg(TSI108_MPIC_OFFSET + 0x30c, 0);
>   }
>   
> -void holly_show_cpuinfo(struct seq_file *m)
> +static void holly_show_cpuinfo(struct seq_file *m)
>   {
>   	seq_printf(m, "vendor\t\t: IBM\n");
>   	seq_printf(m, "machine\t\t: PPC750 GX/CL\n");
>   }
>   
> -void __noreturn holly_restart(char *cmd)
> +static void __noreturn holly_restart(char *cmd)
>   {
>   	__be32 __iomem *ocn_bar1 = NULL;
>   	unsigned long bar;
> @@ -233,18 +234,6 @@ void __noreturn holly_restart(char *cmd)
>   	for (;;) ;
>   }
>   
> -void holly_power_off(void)
> -{
> -	local_irq_disable();
> -	/* No way to shut power off with software */
> -	for (;;) ;
> -}
> -
> -void holly_halt(void)
> -{
> -	holly_power_off();
> -}
> -
>   /*
>    * Called very early, device-tree isn't unflattened
>    */
> 

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] powerpc: Make some functions static
@ 2019-03-12 21:14   ` Christophe Leroy
  0 siblings, 0 replies; 18+ messages in thread
From: Christophe Leroy @ 2019-03-12 21:14 UTC (permalink / raw)
  To: Mathieu Malaterre, Michael Ellerman
  Cc: linuxppc-dev, Paul Mackerras, linux-kernel



Le 12/03/2019 à 21:31, Mathieu Malaterre a écrit :
> In commit cb9e4d10c448 ("[POWERPC] Add support for 750CL Holly board")
> new functions were added. Since these functions can be made static,
> make it so. While doing so, it turns out that holly_power_off and
> holly_halt are unused, so remove them.

I would have said 'since these functions are only used in this C file, 
make them static'.

I think this could be split in two patches:
1/ Remove unused functions, ie holly_halt() and holly_power_off().
2/ Make the other ones static.

Christophe

> 
> Silence the following warnings triggered using W=1:
> 
>    arch/powerpc/platforms/embedded6xx/holly.c:47:5: error: no previous prototype for 'holly_exclude_device' [-Werror=missing-prototypes]
>    arch/powerpc/platforms/embedded6xx/holly.c:190:6: error: no previous prototype for 'holly_show_cpuinfo' [-Werror=missing-prototypes]
>    arch/powerpc/platforms/embedded6xx/holly.c:196:17: error: no previous prototype for 'holly_restart' [-Werror=missing-prototypes]
>    arch/powerpc/platforms/embedded6xx/holly.c:236:6: error: no previous prototype for 'holly_power_off' [-Werror=missing-prototypes]
>    arch/powerpc/platforms/embedded6xx/holly.c:243:6: error: no previous prototype for 'holly_halt' [-Werror=missing-prototypes]
> 
> Signed-off-by: Mathieu Malaterre <malat@debian.org>
> ---
>   arch/powerpc/platforms/embedded6xx/holly.c | 19 ++++---------------
>   1 file changed, 4 insertions(+), 15 deletions(-)
> 
> diff --git a/arch/powerpc/platforms/embedded6xx/holly.c b/arch/powerpc/platforms/embedded6xx/holly.c
> index 0409714e8070..829bf3697dc9 100644
> --- a/arch/powerpc/platforms/embedded6xx/holly.c
> +++ b/arch/powerpc/platforms/embedded6xx/holly.c
> @@ -44,7 +44,8 @@
>   
>   #define HOLLY_PCI_CFG_PHYS 0x7c000000
>   
> -int holly_exclude_device(struct pci_controller *hose, u_char bus, u_char devfn)
> +static int holly_exclude_device(struct pci_controller *hose, u_char bus,
> +				u_char devfn)
>   {
>   	if (bus == 0 && PCI_SLOT(devfn) == 0)
>   		return PCIBIOS_DEVICE_NOT_FOUND;
> @@ -187,13 +188,13 @@ static void __init holly_init_IRQ(void)
>   	tsi108_write_reg(TSI108_MPIC_OFFSET + 0x30c, 0);
>   }
>   
> -void holly_show_cpuinfo(struct seq_file *m)
> +static void holly_show_cpuinfo(struct seq_file *m)
>   {
>   	seq_printf(m, "vendor\t\t: IBM\n");
>   	seq_printf(m, "machine\t\t: PPC750 GX/CL\n");
>   }
>   
> -void __noreturn holly_restart(char *cmd)
> +static void __noreturn holly_restart(char *cmd)
>   {
>   	__be32 __iomem *ocn_bar1 = NULL;
>   	unsigned long bar;
> @@ -233,18 +234,6 @@ void __noreturn holly_restart(char *cmd)
>   	for (;;) ;
>   }
>   
> -void holly_power_off(void)
> -{
> -	local_irq_disable();
> -	/* No way to shut power off with software */
> -	for (;;) ;
> -}
> -
> -void holly_halt(void)
> -{
> -	holly_power_off();
> -}
> -
>   /*
>    * Called very early, device-tree isn't unflattened
>    */
> 

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] powerpc: Make some functions static
  2019-03-12 21:14   ` Christophe Leroy
@ 2019-03-13 20:12     ` Mathieu Malaterre
  -1 siblings, 0 replies; 18+ messages in thread
From: Mathieu Malaterre @ 2019-03-13 20:12 UTC (permalink / raw)
  To: Christophe Leroy; +Cc: Michael Ellerman, Paul Mackerras, linuxppc-dev, LKML

On Tue, Mar 12, 2019 at 10:14 PM Christophe Leroy
<christophe.leroy@c-s.fr> wrote:
>
>
>
> Le 12/03/2019 à 21:31, Mathieu Malaterre a écrit :
> > In commit cb9e4d10c448 ("[POWERPC] Add support for 750CL Holly board")
> > new functions were added. Since these functions can be made static,
> > make it so. While doing so, it turns out that holly_power_off and
> > holly_halt are unused, so remove them.
>
> I would have said 'since these functions are only used in this C file,
> make them static'.
>
> I think this could be split in two patches:
> 1/ Remove unused functions, ie holly_halt() and holly_power_off().
> 2/ Make the other ones static.

Michael do you want two patches ?

> Christophe
>
> >
> > Silence the following warnings triggered using W=1:
> >
> >    arch/powerpc/platforms/embedded6xx/holly.c:47:5: error: no previous prototype for 'holly_exclude_device' [-Werror=missing-prototypes]
> >    arch/powerpc/platforms/embedded6xx/holly.c:190:6: error: no previous prototype for 'holly_show_cpuinfo' [-Werror=missing-prototypes]
> >    arch/powerpc/platforms/embedded6xx/holly.c:196:17: error: no previous prototype for 'holly_restart' [-Werror=missing-prototypes]
> >    arch/powerpc/platforms/embedded6xx/holly.c:236:6: error: no previous prototype for 'holly_power_off' [-Werror=missing-prototypes]
> >    arch/powerpc/platforms/embedded6xx/holly.c:243:6: error: no previous prototype for 'holly_halt' [-Werror=missing-prototypes]
> >
> > Signed-off-by: Mathieu Malaterre <malat@debian.org>
> > ---
> >   arch/powerpc/platforms/embedded6xx/holly.c | 19 ++++---------------
> >   1 file changed, 4 insertions(+), 15 deletions(-)
> >
> > diff --git a/arch/powerpc/platforms/embedded6xx/holly.c b/arch/powerpc/platforms/embedded6xx/holly.c
> > index 0409714e8070..829bf3697dc9 100644
> > --- a/arch/powerpc/platforms/embedded6xx/holly.c
> > +++ b/arch/powerpc/platforms/embedded6xx/holly.c
> > @@ -44,7 +44,8 @@
> >
> >   #define HOLLY_PCI_CFG_PHYS 0x7c000000
> >
> > -int holly_exclude_device(struct pci_controller *hose, u_char bus, u_char devfn)
> > +static int holly_exclude_device(struct pci_controller *hose, u_char bus,
> > +                             u_char devfn)
> >   {
> >       if (bus == 0 && PCI_SLOT(devfn) == 0)
> >               return PCIBIOS_DEVICE_NOT_FOUND;
> > @@ -187,13 +188,13 @@ static void __init holly_init_IRQ(void)
> >       tsi108_write_reg(TSI108_MPIC_OFFSET + 0x30c, 0);
> >   }
> >
> > -void holly_show_cpuinfo(struct seq_file *m)
> > +static void holly_show_cpuinfo(struct seq_file *m)
> >   {
> >       seq_printf(m, "vendor\t\t: IBM\n");
> >       seq_printf(m, "machine\t\t: PPC750 GX/CL\n");
> >   }
> >
> > -void __noreturn holly_restart(char *cmd)
> > +static void __noreturn holly_restart(char *cmd)
> >   {
> >       __be32 __iomem *ocn_bar1 = NULL;
> >       unsigned long bar;
> > @@ -233,18 +234,6 @@ void __noreturn holly_restart(char *cmd)
> >       for (;;) ;
> >   }
> >
> > -void holly_power_off(void)
> > -{
> > -     local_irq_disable();
> > -     /* No way to shut power off with software */
> > -     for (;;) ;
> > -}
> > -
> > -void holly_halt(void)
> > -{
> > -     holly_power_off();
> > -}
> > -
> >   /*
> >    * Called very early, device-tree isn't unflattened
> >    */
> >

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] powerpc: Make some functions static
@ 2019-03-13 20:12     ` Mathieu Malaterre
  0 siblings, 0 replies; 18+ messages in thread
From: Mathieu Malaterre @ 2019-03-13 20:12 UTC (permalink / raw)
  To: Christophe Leroy; +Cc: Paul Mackerras, linuxppc-dev, LKML

On Tue, Mar 12, 2019 at 10:14 PM Christophe Leroy
<christophe.leroy@c-s.fr> wrote:
>
>
>
> Le 12/03/2019 à 21:31, Mathieu Malaterre a écrit :
> > In commit cb9e4d10c448 ("[POWERPC] Add support for 750CL Holly board")
> > new functions were added. Since these functions can be made static,
> > make it so. While doing so, it turns out that holly_power_off and
> > holly_halt are unused, so remove them.
>
> I would have said 'since these functions are only used in this C file,
> make them static'.
>
> I think this could be split in two patches:
> 1/ Remove unused functions, ie holly_halt() and holly_power_off().
> 2/ Make the other ones static.

Michael do you want two patches ?

> Christophe
>
> >
> > Silence the following warnings triggered using W=1:
> >
> >    arch/powerpc/platforms/embedded6xx/holly.c:47:5: error: no previous prototype for 'holly_exclude_device' [-Werror=missing-prototypes]
> >    arch/powerpc/platforms/embedded6xx/holly.c:190:6: error: no previous prototype for 'holly_show_cpuinfo' [-Werror=missing-prototypes]
> >    arch/powerpc/platforms/embedded6xx/holly.c:196:17: error: no previous prototype for 'holly_restart' [-Werror=missing-prototypes]
> >    arch/powerpc/platforms/embedded6xx/holly.c:236:6: error: no previous prototype for 'holly_power_off' [-Werror=missing-prototypes]
> >    arch/powerpc/platforms/embedded6xx/holly.c:243:6: error: no previous prototype for 'holly_halt' [-Werror=missing-prototypes]
> >
> > Signed-off-by: Mathieu Malaterre <malat@debian.org>
> > ---
> >   arch/powerpc/platforms/embedded6xx/holly.c | 19 ++++---------------
> >   1 file changed, 4 insertions(+), 15 deletions(-)
> >
> > diff --git a/arch/powerpc/platforms/embedded6xx/holly.c b/arch/powerpc/platforms/embedded6xx/holly.c
> > index 0409714e8070..829bf3697dc9 100644
> > --- a/arch/powerpc/platforms/embedded6xx/holly.c
> > +++ b/arch/powerpc/platforms/embedded6xx/holly.c
> > @@ -44,7 +44,8 @@
> >
> >   #define HOLLY_PCI_CFG_PHYS 0x7c000000
> >
> > -int holly_exclude_device(struct pci_controller *hose, u_char bus, u_char devfn)
> > +static int holly_exclude_device(struct pci_controller *hose, u_char bus,
> > +                             u_char devfn)
> >   {
> >       if (bus == 0 && PCI_SLOT(devfn) == 0)
> >               return PCIBIOS_DEVICE_NOT_FOUND;
> > @@ -187,13 +188,13 @@ static void __init holly_init_IRQ(void)
> >       tsi108_write_reg(TSI108_MPIC_OFFSET + 0x30c, 0);
> >   }
> >
> > -void holly_show_cpuinfo(struct seq_file *m)
> > +static void holly_show_cpuinfo(struct seq_file *m)
> >   {
> >       seq_printf(m, "vendor\t\t: IBM\n");
> >       seq_printf(m, "machine\t\t: PPC750 GX/CL\n");
> >   }
> >
> > -void __noreturn holly_restart(char *cmd)
> > +static void __noreturn holly_restart(char *cmd)
> >   {
> >       __be32 __iomem *ocn_bar1 = NULL;
> >       unsigned long bar;
> > @@ -233,18 +234,6 @@ void __noreturn holly_restart(char *cmd)
> >       for (;;) ;
> >   }
> >
> > -void holly_power_off(void)
> > -{
> > -     local_irq_disable();
> > -     /* No way to shut power off with software */
> > -     for (;;) ;
> > -}
> > -
> > -void holly_halt(void)
> > -{
> > -     holly_power_off();
> > -}
> > -
> >   /*
> >    * Called very early, device-tree isn't unflattened
> >    */
> >

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] powerpc: Make some functions static
  2019-03-13 20:12     ` Mathieu Malaterre
@ 2019-03-20 12:52       ` Michael Ellerman
  -1 siblings, 0 replies; 18+ messages in thread
From: Michael Ellerman @ 2019-03-20 12:52 UTC (permalink / raw)
  To: Mathieu Malaterre, Christophe Leroy; +Cc: Paul Mackerras, linuxppc-dev, LKML

Mathieu Malaterre <malat@debian.org> writes:
> On Tue, Mar 12, 2019 at 10:14 PM Christophe Leroy
> <christophe.leroy@c-s.fr> wrote:
>>
>>
>>
>> Le 12/03/2019 à 21:31, Mathieu Malaterre a écrit :
>> > In commit cb9e4d10c448 ("[POWERPC] Add support for 750CL Holly board")
>> > new functions were added. Since these functions can be made static,
>> > make it so. While doing so, it turns out that holly_power_off and
>> > holly_halt are unused, so remove them.
>>
>> I would have said 'since these functions are only used in this C file,
>> make them static'.
>>
>> I think this could be split in two patches:
>> 1/ Remove unused functions, ie holly_halt() and holly_power_off().
>> 2/ Make the other ones static.
>
> Michael do you want two patches ?

That would be better if it's not too much trouble. A patch with a title
of "Make some functions static" shouldn't really be deleting functions
entirely.

cheers

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] powerpc: Make some functions static
@ 2019-03-20 12:52       ` Michael Ellerman
  0 siblings, 0 replies; 18+ messages in thread
From: Michael Ellerman @ 2019-03-20 12:52 UTC (permalink / raw)
  To: Mathieu Malaterre, Christophe Leroy; +Cc: linuxppc-dev, Paul Mackerras, LKML

Mathieu Malaterre <malat@debian.org> writes:
> On Tue, Mar 12, 2019 at 10:14 PM Christophe Leroy
> <christophe.leroy@c-s.fr> wrote:
>>
>>
>>
>> Le 12/03/2019 à 21:31, Mathieu Malaterre a écrit :
>> > In commit cb9e4d10c448 ("[POWERPC] Add support for 750CL Holly board")
>> > new functions were added. Since these functions can be made static,
>> > make it so. While doing so, it turns out that holly_power_off and
>> > holly_halt are unused, so remove them.
>>
>> I would have said 'since these functions are only used in this C file,
>> make them static'.
>>
>> I think this could be split in two patches:
>> 1/ Remove unused functions, ie holly_halt() and holly_power_off().
>> 2/ Make the other ones static.
>
> Michael do you want two patches ?

That would be better if it's not too much trouble. A patch with a title
of "Make some functions static" shouldn't really be deleting functions
entirely.

cheers

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v2 1/2] powerpc: Make some functions static
  2019-03-12 20:31 ` Mathieu Malaterre
@ 2019-03-26 20:47   ` Mathieu Malaterre
  -1 siblings, 0 replies; 18+ messages in thread
From: Mathieu Malaterre @ 2019-03-26 20:47 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: Mathieu Malaterre, Benjamin Herrenschmidt, Paul Mackerras,
	linuxppc-dev, linux-kernel

In commit cb9e4d10c448 ("[POWERPC] Add support for 750CL Holly board")
new functions were added. Since most of these functions can be made static,
make it so.

Both holly_power_off and holly_halt functions were not changed since they
are unused, making them static would have triggered the following warning
(treated as error):

  arch/powerpc/platforms/embedded6xx/holly.c:244:13: error: 'holly_halt' defined but not used [-Werror=unused-function]

Silence the following warnings triggered using W=1:

  arch/powerpc/platforms/embedded6xx/holly.c:47:5: error: no previous prototype for 'holly_exclude_device' [-Werror=missing-prototypes]
  arch/powerpc/platforms/embedded6xx/holly.c:190:6: error: no previous prototype for 'holly_show_cpuinfo' [-Werror=missing-prototypes]
  arch/powerpc/platforms/embedded6xx/holly.c:196:17: error: no previous prototype for 'holly_restart' [-Werror=missing-prototypes]

Signed-off-by: Mathieu Malaterre <malat@debian.org>
---
v2: Split the patch in two operations

 arch/powerpc/platforms/embedded6xx/holly.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/platforms/embedded6xx/holly.c b/arch/powerpc/platforms/embedded6xx/holly.c
index 0409714e8070..9d2eefef7b7b 100644
--- a/arch/powerpc/platforms/embedded6xx/holly.c
+++ b/arch/powerpc/platforms/embedded6xx/holly.c
@@ -44,7 +44,8 @@
 
 #define HOLLY_PCI_CFG_PHYS 0x7c000000
 
-int holly_exclude_device(struct pci_controller *hose, u_char bus, u_char devfn)
+static int holly_exclude_device(struct pci_controller *hose, u_char bus,
+				u_char devfn)
 {
 	if (bus == 0 && PCI_SLOT(devfn) == 0)
 		return PCIBIOS_DEVICE_NOT_FOUND;
@@ -187,13 +188,13 @@ static void __init holly_init_IRQ(void)
 	tsi108_write_reg(TSI108_MPIC_OFFSET + 0x30c, 0);
 }
 
-void holly_show_cpuinfo(struct seq_file *m)
+static void holly_show_cpuinfo(struct seq_file *m)
 {
 	seq_printf(m, "vendor\t\t: IBM\n");
 	seq_printf(m, "machine\t\t: PPC750 GX/CL\n");
 }
 
-void __noreturn holly_restart(char *cmd)
+static void __noreturn holly_restart(char *cmd)
 {
 	__be32 __iomem *ocn_bar1 = NULL;
 	unsigned long bar;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v2 1/2] powerpc: Make some functions static
@ 2019-03-26 20:47   ` Mathieu Malaterre
  0 siblings, 0 replies; 18+ messages in thread
From: Mathieu Malaterre @ 2019-03-26 20:47 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: Mathieu Malaterre, Paul Mackerras, linuxppc-dev, linux-kernel

In commit cb9e4d10c448 ("[POWERPC] Add support for 750CL Holly board")
new functions were added. Since most of these functions can be made static,
make it so.

Both holly_power_off and holly_halt functions were not changed since they
are unused, making them static would have triggered the following warning
(treated as error):

  arch/powerpc/platforms/embedded6xx/holly.c:244:13: error: 'holly_halt' defined but not used [-Werror=unused-function]

Silence the following warnings triggered using W=1:

  arch/powerpc/platforms/embedded6xx/holly.c:47:5: error: no previous prototype for 'holly_exclude_device' [-Werror=missing-prototypes]
  arch/powerpc/platforms/embedded6xx/holly.c:190:6: error: no previous prototype for 'holly_show_cpuinfo' [-Werror=missing-prototypes]
  arch/powerpc/platforms/embedded6xx/holly.c:196:17: error: no previous prototype for 'holly_restart' [-Werror=missing-prototypes]

Signed-off-by: Mathieu Malaterre <malat@debian.org>
---
v2: Split the patch in two operations

 arch/powerpc/platforms/embedded6xx/holly.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/platforms/embedded6xx/holly.c b/arch/powerpc/platforms/embedded6xx/holly.c
index 0409714e8070..9d2eefef7b7b 100644
--- a/arch/powerpc/platforms/embedded6xx/holly.c
+++ b/arch/powerpc/platforms/embedded6xx/holly.c
@@ -44,7 +44,8 @@
 
 #define HOLLY_PCI_CFG_PHYS 0x7c000000
 
-int holly_exclude_device(struct pci_controller *hose, u_char bus, u_char devfn)
+static int holly_exclude_device(struct pci_controller *hose, u_char bus,
+				u_char devfn)
 {
 	if (bus == 0 && PCI_SLOT(devfn) == 0)
 		return PCIBIOS_DEVICE_NOT_FOUND;
@@ -187,13 +188,13 @@ static void __init holly_init_IRQ(void)
 	tsi108_write_reg(TSI108_MPIC_OFFSET + 0x30c, 0);
 }
 
-void holly_show_cpuinfo(struct seq_file *m)
+static void holly_show_cpuinfo(struct seq_file *m)
 {
 	seq_printf(m, "vendor\t\t: IBM\n");
 	seq_printf(m, "machine\t\t: PPC750 GX/CL\n");
 }
 
-void __noreturn holly_restart(char *cmd)
+static void __noreturn holly_restart(char *cmd)
 {
 	__be32 __iomem *ocn_bar1 = NULL;
 	unsigned long bar;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v2 2/2] Remove functions holly_power_off and holly_halt since unused
  2019-03-26 20:47   ` Mathieu Malaterre
@ 2019-03-26 20:47     ` Mathieu Malaterre
  -1 siblings, 0 replies; 18+ messages in thread
From: Mathieu Malaterre @ 2019-03-26 20:47 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: Mathieu Malaterre, Benjamin Herrenschmidt, Paul Mackerras,
	linuxppc-dev, linux-kernel

Silence the following warnings triggered using W=1:

  arch/powerpc/platforms/embedded6xx/holly.c:236:6: error: no previous prototype for 'holly_power_off' [-Werror=missing-prototypes]
  arch/powerpc/platforms/embedded6xx/holly.c:243:6: error: no previous prototype for 'holly_halt' [-Werror=missing-prototypes]

Signed-off-by: Mathieu Malaterre <malat@debian.org>
---
 arch/powerpc/platforms/embedded6xx/holly.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/arch/powerpc/platforms/embedded6xx/holly.c b/arch/powerpc/platforms/embedded6xx/holly.c
index 9d2eefef7b7b..829bf3697dc9 100644
--- a/arch/powerpc/platforms/embedded6xx/holly.c
+++ b/arch/powerpc/platforms/embedded6xx/holly.c
@@ -234,18 +234,6 @@ static void __noreturn holly_restart(char *cmd)
 	for (;;) ;
 }
 
-void holly_power_off(void)
-{
-	local_irq_disable();
-	/* No way to shut power off with software */
-	for (;;) ;
-}
-
-void holly_halt(void)
-{
-	holly_power_off();
-}
-
 /*
  * Called very early, device-tree isn't unflattened
  */
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v2 2/2] Remove functions holly_power_off and holly_halt since unused
@ 2019-03-26 20:47     ` Mathieu Malaterre
  0 siblings, 0 replies; 18+ messages in thread
From: Mathieu Malaterre @ 2019-03-26 20:47 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: Mathieu Malaterre, Paul Mackerras, linuxppc-dev, linux-kernel

Silence the following warnings triggered using W=1:

  arch/powerpc/platforms/embedded6xx/holly.c:236:6: error: no previous prototype for 'holly_power_off' [-Werror=missing-prototypes]
  arch/powerpc/platforms/embedded6xx/holly.c:243:6: error: no previous prototype for 'holly_halt' [-Werror=missing-prototypes]

Signed-off-by: Mathieu Malaterre <malat@debian.org>
---
 arch/powerpc/platforms/embedded6xx/holly.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/arch/powerpc/platforms/embedded6xx/holly.c b/arch/powerpc/platforms/embedded6xx/holly.c
index 9d2eefef7b7b..829bf3697dc9 100644
--- a/arch/powerpc/platforms/embedded6xx/holly.c
+++ b/arch/powerpc/platforms/embedded6xx/holly.c
@@ -234,18 +234,6 @@ static void __noreturn holly_restart(char *cmd)
 	for (;;) ;
 }
 
-void holly_power_off(void)
-{
-	local_irq_disable();
-	/* No way to shut power off with software */
-	for (;;) ;
-}
-
-void holly_halt(void)
-{
-	holly_power_off();
-}
-
 /*
  * Called very early, device-tree isn't unflattened
  */
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH v2 2/2] Remove functions holly_power_off and holly_halt since unused
  2019-03-26 20:47     ` Mathieu Malaterre
@ 2019-03-27 12:24       ` Mukesh Ojha
  -1 siblings, 0 replies; 18+ messages in thread
From: Mukesh Ojha @ 2019-03-27 12:24 UTC (permalink / raw)
  To: Mathieu Malaterre, Michael Ellerman
  Cc: Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev, linux-kernel


On 3/27/2019 2:17 AM, Mathieu Malaterre wrote:
> Silence the following warnings triggered using W=1:
>
>    arch/powerpc/platforms/embedded6xx/holly.c:236:6: error: no previous prototype for 'holly_power_off' [-Werror=missing-prototypes]
>    arch/powerpc/platforms/embedded6xx/holly.c:243:6: error: no previous prototype for 'holly_halt' [-Werror=missing-prototypes]
>
> Signed-off-by: Mathieu Malaterre <malat@debian.org>

Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>

-Mukesh


> ---
>   arch/powerpc/platforms/embedded6xx/holly.c | 12 ------------
>   1 file changed, 12 deletions(-)
>
> diff --git a/arch/powerpc/platforms/embedded6xx/holly.c b/arch/powerpc/platforms/embedded6xx/holly.c
> index 9d2eefef7b7b..829bf3697dc9 100644
> --- a/arch/powerpc/platforms/embedded6xx/holly.c
> +++ b/arch/powerpc/platforms/embedded6xx/holly.c
> @@ -234,18 +234,6 @@ static void __noreturn holly_restart(char *cmd)
>   	for (;;) ;
>   }
>   
> -void holly_power_off(void)
> -{
> -	local_irq_disable();
> -	/* No way to shut power off with software */
> -	for (;;) ;
> -}
> -
> -void holly_halt(void)
> -{
> -	holly_power_off();
> -}
> -
>   /*
>    * Called very early, device-tree isn't unflattened
>    */

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v2 2/2] Remove functions holly_power_off and holly_halt since unused
@ 2019-03-27 12:24       ` Mukesh Ojha
  0 siblings, 0 replies; 18+ messages in thread
From: Mukesh Ojha @ 2019-03-27 12:24 UTC (permalink / raw)
  To: Mathieu Malaterre, Michael Ellerman
  Cc: Paul Mackerras, linuxppc-dev, linux-kernel


On 3/27/2019 2:17 AM, Mathieu Malaterre wrote:
> Silence the following warnings triggered using W=1:
>
>    arch/powerpc/platforms/embedded6xx/holly.c:236:6: error: no previous prototype for 'holly_power_off' [-Werror=missing-prototypes]
>    arch/powerpc/platforms/embedded6xx/holly.c:243:6: error: no previous prototype for 'holly_halt' [-Werror=missing-prototypes]
>
> Signed-off-by: Mathieu Malaterre <malat@debian.org>

Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>

-Mukesh


> ---
>   arch/powerpc/platforms/embedded6xx/holly.c | 12 ------------
>   1 file changed, 12 deletions(-)
>
> diff --git a/arch/powerpc/platforms/embedded6xx/holly.c b/arch/powerpc/platforms/embedded6xx/holly.c
> index 9d2eefef7b7b..829bf3697dc9 100644
> --- a/arch/powerpc/platforms/embedded6xx/holly.c
> +++ b/arch/powerpc/platforms/embedded6xx/holly.c
> @@ -234,18 +234,6 @@ static void __noreturn holly_restart(char *cmd)
>   	for (;;) ;
>   }
>   
> -void holly_power_off(void)
> -{
> -	local_irq_disable();
> -	/* No way to shut power off with software */
> -	for (;;) ;
> -}
> -
> -void holly_halt(void)
> -{
> -	holly_power_off();
> -}
> -
>   /*
>    * Called very early, device-tree isn't unflattened
>    */

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v2 1/2] powerpc: Make some functions static
  2019-03-26 20:47   ` Mathieu Malaterre
@ 2019-03-27 12:40     ` Mukesh Ojha
  -1 siblings, 0 replies; 18+ messages in thread
From: Mukesh Ojha @ 2019-03-27 12:40 UTC (permalink / raw)
  To: Mathieu Malaterre, Michael Ellerman
  Cc: Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev, linux-kernel


On 3/27/2019 2:17 AM, Mathieu Malaterre wrote:
> In commit cb9e4d10c448 ("[POWERPC] Add support for 750CL Holly board")
> new functions were added. Since most of these functions can be made static,
> make it so.
>
> Both holly_power_off and holly_halt functions were not changed since they
> are unused, making them static would have triggered the following warning
> (treated as error):
>
>    arch/powerpc/platforms/embedded6xx/holly.c:244:13: error: 'holly_halt' defined but not used [-Werror=unused-function]
>
> Silence the following warnings triggered using W=1:
>
>    arch/powerpc/platforms/embedded6xx/holly.c:47:5: error: no previous prototype for 'holly_exclude_device' [-Werror=missing-prototypes]
>    arch/powerpc/platforms/embedded6xx/holly.c:190:6: error: no previous prototype for 'holly_show_cpuinfo' [-Werror=missing-prototypes]
>    arch/powerpc/platforms/embedded6xx/holly.c:196:17: error: no previous prototype for 'holly_restart' [-Werror=missing-prototypes]
>
> Signed-off-by: Mathieu Malaterre <malat@debian.org>


Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>

> ---
> v2: Split the patch in two operations
>
>   arch/powerpc/platforms/embedded6xx/holly.c | 7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/arch/powerpc/platforms/embedded6xx/holly.c b/arch/powerpc/platforms/embedded6xx/holly.c
> index 0409714e8070..9d2eefef7b7b 100644
> --- a/arch/powerpc/platforms/embedded6xx/holly.c
> +++ b/arch/powerpc/platforms/embedded6xx/holly.c
> @@ -44,7 +44,8 @@
>   
>   #define HOLLY_PCI_CFG_PHYS 0x7c000000
>   
> -int holly_exclude_device(struct pci_controller *hose, u_char bus, u_char devfn)
> +static int holly_exclude_device(struct pci_controller *hose, u_char bus,
> +				u_char devfn)
>   {
>   	if (bus == 0 && PCI_SLOT(devfn) == 0)
>   		return PCIBIOS_DEVICE_NOT_FOUND;
> @@ -187,13 +188,13 @@ static void __init holly_init_IRQ(void)
>   	tsi108_write_reg(TSI108_MPIC_OFFSET + 0x30c, 0);
>   }
>   
> -void holly_show_cpuinfo(struct seq_file *m)
> +static void holly_show_cpuinfo(struct seq_file *m)
>   {
>   	seq_printf(m, "vendor\t\t: IBM\n");
>   	seq_printf(m, "machine\t\t: PPC750 GX/CL\n");
>   }
>   
> -void __noreturn holly_restart(char *cmd)
> +static void __noreturn holly_restart(char *cmd)
>   {
>   	__be32 __iomem *ocn_bar1 = NULL;
>   	unsigned long bar;

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v2 1/2] powerpc: Make some functions static
@ 2019-03-27 12:40     ` Mukesh Ojha
  0 siblings, 0 replies; 18+ messages in thread
From: Mukesh Ojha @ 2019-03-27 12:40 UTC (permalink / raw)
  To: Mathieu Malaterre, Michael Ellerman
  Cc: Paul Mackerras, linuxppc-dev, linux-kernel


On 3/27/2019 2:17 AM, Mathieu Malaterre wrote:
> In commit cb9e4d10c448 ("[POWERPC] Add support for 750CL Holly board")
> new functions were added. Since most of these functions can be made static,
> make it so.
>
> Both holly_power_off and holly_halt functions were not changed since they
> are unused, making them static would have triggered the following warning
> (treated as error):
>
>    arch/powerpc/platforms/embedded6xx/holly.c:244:13: error: 'holly_halt' defined but not used [-Werror=unused-function]
>
> Silence the following warnings triggered using W=1:
>
>    arch/powerpc/platforms/embedded6xx/holly.c:47:5: error: no previous prototype for 'holly_exclude_device' [-Werror=missing-prototypes]
>    arch/powerpc/platforms/embedded6xx/holly.c:190:6: error: no previous prototype for 'holly_show_cpuinfo' [-Werror=missing-prototypes]
>    arch/powerpc/platforms/embedded6xx/holly.c:196:17: error: no previous prototype for 'holly_restart' [-Werror=missing-prototypes]
>
> Signed-off-by: Mathieu Malaterre <malat@debian.org>


Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>

> ---
> v2: Split the patch in two operations
>
>   arch/powerpc/platforms/embedded6xx/holly.c | 7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/arch/powerpc/platforms/embedded6xx/holly.c b/arch/powerpc/platforms/embedded6xx/holly.c
> index 0409714e8070..9d2eefef7b7b 100644
> --- a/arch/powerpc/platforms/embedded6xx/holly.c
> +++ b/arch/powerpc/platforms/embedded6xx/holly.c
> @@ -44,7 +44,8 @@
>   
>   #define HOLLY_PCI_CFG_PHYS 0x7c000000
>   
> -int holly_exclude_device(struct pci_controller *hose, u_char bus, u_char devfn)
> +static int holly_exclude_device(struct pci_controller *hose, u_char bus,
> +				u_char devfn)
>   {
>   	if (bus == 0 && PCI_SLOT(devfn) == 0)
>   		return PCIBIOS_DEVICE_NOT_FOUND;
> @@ -187,13 +188,13 @@ static void __init holly_init_IRQ(void)
>   	tsi108_write_reg(TSI108_MPIC_OFFSET + 0x30c, 0);
>   }
>   
> -void holly_show_cpuinfo(struct seq_file *m)
> +static void holly_show_cpuinfo(struct seq_file *m)
>   {
>   	seq_printf(m, "vendor\t\t: IBM\n");
>   	seq_printf(m, "machine\t\t: PPC750 GX/CL\n");
>   }
>   
> -void __noreturn holly_restart(char *cmd)
> +static void __noreturn holly_restart(char *cmd)
>   {
>   	__be32 __iomem *ocn_bar1 = NULL;
>   	unsigned long bar;

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [v2,1/2] powerpc: Make some functions static
  2019-03-26 20:47   ` Mathieu Malaterre
@ 2019-04-21 14:18     ` Michael Ellerman
  -1 siblings, 0 replies; 18+ messages in thread
From: Michael Ellerman @ 2019-04-21 14:18 UTC (permalink / raw)
  To: Mathieu Malaterre
  Cc: Mathieu Malaterre, Paul Mackerras, linuxppc-dev, linux-kernel

On Tue, 2019-03-26 at 20:47:18 UTC, Mathieu Malaterre wrote:
> In commit cb9e4d10c448 ("[POWERPC] Add support for 750CL Holly board")
> new functions were added. Since most of these functions can be made static,
> make it so.
> 
> Both holly_power_off and holly_halt functions were not changed since they
> are unused, making them static would have triggered the following warning
> (treated as error):
> 
>   arch/powerpc/platforms/embedded6xx/holly.c:244:13: error: 'holly_halt' defined but not used [-Werror=unused-function]
> 
> Silence the following warnings triggered using W=1:
> 
>   arch/powerpc/platforms/embedded6xx/holly.c:47:5: error: no previous prototype for 'holly_exclude_device' [-Werror=missing-prototypes]
>   arch/powerpc/platforms/embedded6xx/holly.c:190:6: error: no previous prototype for 'holly_show_cpuinfo' [-Werror=missing-prototypes]
>   arch/powerpc/platforms/embedded6xx/holly.c:196:17: error: no previous prototype for 'holly_restart' [-Werror=missing-prototypes]
> 
> Signed-off-by: Mathieu Malaterre <malat@debian.org>
> Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>

Series applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/308be6c7817c850b55c3b6ff4bf53c24

cheers

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [v2,1/2] powerpc: Make some functions static
@ 2019-04-21 14:18     ` Michael Ellerman
  0 siblings, 0 replies; 18+ messages in thread
From: Michael Ellerman @ 2019-04-21 14:18 UTC (permalink / raw)
  To: Mathieu Malaterre
  Cc: Mathieu Malaterre, linuxppc-dev, Paul Mackerras, linux-kernel

On Tue, 2019-03-26 at 20:47:18 UTC, Mathieu Malaterre wrote:
> In commit cb9e4d10c448 ("[POWERPC] Add support for 750CL Holly board")
> new functions were added. Since most of these functions can be made static,
> make it so.
> 
> Both holly_power_off and holly_halt functions were not changed since they
> are unused, making them static would have triggered the following warning
> (treated as error):
> 
>   arch/powerpc/platforms/embedded6xx/holly.c:244:13: error: 'holly_halt' defined but not used [-Werror=unused-function]
> 
> Silence the following warnings triggered using W=1:
> 
>   arch/powerpc/platforms/embedded6xx/holly.c:47:5: error: no previous prototype for 'holly_exclude_device' [-Werror=missing-prototypes]
>   arch/powerpc/platforms/embedded6xx/holly.c:190:6: error: no previous prototype for 'holly_show_cpuinfo' [-Werror=missing-prototypes]
>   arch/powerpc/platforms/embedded6xx/holly.c:196:17: error: no previous prototype for 'holly_restart' [-Werror=missing-prototypes]
> 
> Signed-off-by: Mathieu Malaterre <malat@debian.org>
> Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>

Series applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/308be6c7817c850b55c3b6ff4bf53c24

cheers

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2019-04-21 14:46 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-12 20:31 [PATCH] powerpc: Make some functions static Mathieu Malaterre
2019-03-12 20:31 ` Mathieu Malaterre
2019-03-12 21:14 ` Christophe Leroy
2019-03-12 21:14   ` Christophe Leroy
2019-03-13 20:12   ` Mathieu Malaterre
2019-03-13 20:12     ` Mathieu Malaterre
2019-03-20 12:52     ` Michael Ellerman
2019-03-20 12:52       ` Michael Ellerman
2019-03-26 20:47 ` [PATCH v2 1/2] " Mathieu Malaterre
2019-03-26 20:47   ` Mathieu Malaterre
2019-03-26 20:47   ` [PATCH v2 2/2] Remove functions holly_power_off and holly_halt since unused Mathieu Malaterre
2019-03-26 20:47     ` Mathieu Malaterre
2019-03-27 12:24     ` Mukesh Ojha
2019-03-27 12:24       ` Mukesh Ojha
2019-03-27 12:40   ` [PATCH v2 1/2] powerpc: Make some functions static Mukesh Ojha
2019-03-27 12:40     ` Mukesh Ojha
2019-04-21 14:18   ` [v2,1/2] " Michael Ellerman
2019-04-21 14:18     ` 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.