mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v1 1/3] ARM: rpi: make locally used functions static
@ 2019-01-15 10:34 Roland Hieber
  2019-01-15 10:34 ` [PATCH v1 2/3] mci: bcm2835: " Roland Hieber
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Roland Hieber @ 2019-01-15 10:34 UTC (permalink / raw)
  To: barebox; +Cc: Roland Hieber

These functions are not meant to be a public interface, so they can well
be static. rpi_b_plus_init() was previously declared with a prototype,
which is no longer needed.

This fixes the following build warnings:

    .../arch/arm/boards/raspberry-pi/rpi-common.c:124:6: warning: no previous prototype for 'rpi_add_led' [-Wmissing-prototypes]
     void rpi_add_led(void)
          ^~~~~~~~~~~
    .../arch/arm/boards/raspberry-pi/rpi-common.c:141:6: warning: no previous prototype for 'rpi_b_init' [-Wmissing-prototypes]
     void rpi_b_init(void)

Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
 arch/arm/boards/raspberry-pi/rpi-common.c | 6 +++---
 arch/arm/boards/raspberry-pi/rpi.h        | 1 -
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boards/raspberry-pi/rpi-common.c b/arch/arm/boards/raspberry-pi/rpi-common.c
index 650b26ce7d..2521bb7aa2 100644
--- a/arch/arm/boards/raspberry-pi/rpi-common.c
+++ b/arch/arm/boards/raspberry-pi/rpi-common.c
@@ -121,7 +121,7 @@ struct gpio_led rpi_leds[] = {
 	},
 };
 
-void rpi_add_led(void)
+static void rpi_add_led(void)
 {
 	int i;
 	struct gpio_led *l;
@@ -138,14 +138,14 @@ void rpi_add_led(void)
 		led_set_trigger(LED_TRIGGER_HEARTBEAT, &l->led);
 }
 
-void rpi_b_init(void)
+static void rpi_b_init(void)
 {
 	rpi_leds[0].gpio = 16;
 	rpi_leds[0].active_low = 1;
 	rpi_set_usbethaddr();
 }
 
-void rpi_b_plus_init(void)
+static void rpi_b_plus_init(void)
 {
 	rpi_leds[0].gpio = 47;
 	rpi_leds[1].gpio = 35;
diff --git a/arch/arm/boards/raspberry-pi/rpi.h b/arch/arm/boards/raspberry-pi/rpi.h
index dd32fee809..b2a0401bd0 100644
--- a/arch/arm/boards/raspberry-pi/rpi.h
+++ b/arch/arm/boards/raspberry-pi/rpi.h
@@ -19,7 +19,6 @@ struct rpi_model {
 
 extern struct gpio_led rpi_leds[];
 
-void rpi_b_plus_init(void);
 void rpi_set_usbethaddr(void);
 
 #endif /* __ARCH_ARM_BOARDS_RPI_H__ */
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH v1 2/3] mci: bcm2835: make locally used functions static
  2019-01-15 10:34 [PATCH v1 1/3] ARM: rpi: make locally used functions static Roland Hieber
@ 2019-01-15 10:34 ` Roland Hieber
  2019-01-15 10:34 ` [PATCH v1 3/3] amba: pl011: " Roland Hieber
  2019-01-16  7:52 ` [PATCH v1 1/3] ARM: rpi: " Sascha Hauer
  2 siblings, 0 replies; 7+ messages in thread
From: Roland Hieber @ 2019-01-15 10:34 UTC (permalink / raw)
  To: barebox; +Cc: Roland Hieber

The mci-bcm2835 driver registers itself as an MCI driver on probing, and
is thereby used through the MCI interface, so these functions are not
meant to act as a public interface and only used internally in this
compilation unit.

This fixes the following build warnings:

    .../drivers/mci/mci-bcm2835.c:56:6: warning: no previous prototype for 'bcm2835_mci_write' [-Wmissing-prototypes]
     void bcm2835_mci_write(struct bcm2835_mci_host *host, u32 reg, u32 val)
          ^~~~~~~~~~~~~~~~~
    .../drivers/mci/mci-bcm2835.c:74:5: warning: no previous prototype for 'bcm2835_mci_read' [-Wmissing-prototypes]
     u32 bcm2835_mci_read(struct bcm2835_mci_host *host, u32 reg)
         ^~~~~~~~~~~~~~~~
    .../drivers/mci/mci-bcm2835.c:83:6: warning: no previous prototype for 'bcm2835_mci_write_data' [-Wmissing-prototypes]
     void bcm2835_mci_write_data(struct bcm2835_mci_host *host, u32 *p)
          ^~~~~~~~~~~~~~~~~~~~~~
    .../drivers/mci/mci-bcm2835.c:89:6: warning: no previous prototype for 'bcm2835_mci_read_data' [-Wmissing-prototypes]
     void bcm2835_mci_read_data(struct bcm2835_mci_host *host, u32 *p)
          ^~~~~~~~~~~~~~~~~~~~~
      CC      common/date.o
    .../drivers/mci/mci-bcm2835.c:419:5: warning: no previous prototype for 'bcm2835_mci_reset' [-Wmissing-prototypes]
     int bcm2835_mci_reset(struct mci_host *mci, struct device_d *mci_dev)

Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
 drivers/mci/mci-bcm2835.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/mci/mci-bcm2835.c b/drivers/mci/mci-bcm2835.c
index daf771934a..9438e66af0 100644
--- a/drivers/mci/mci-bcm2835.c
+++ b/drivers/mci/mci-bcm2835.c
@@ -53,7 +53,7 @@ struct bcm2835_mci_host {
 	uint64_t last_write;
 };
 
-void bcm2835_mci_write(struct bcm2835_mci_host *host, u32 reg, u32 val)
+static void bcm2835_mci_write(struct bcm2835_mci_host *host, u32 reg, u32 val)
 {
 	/*
 	 * The Arasan has a bugette whereby it may lose the content of
@@ -71,7 +71,7 @@ void bcm2835_mci_write(struct bcm2835_mci_host *host, u32 reg, u32 val)
 	writel(val, host->regs + reg);
 }
 
-u32 bcm2835_mci_read(struct bcm2835_mci_host *host, u32 reg)
+static u32 bcm2835_mci_read(struct bcm2835_mci_host *host, u32 reg)
 {
 	return readl(host->regs + reg);
 }
@@ -80,13 +80,13 @@ u32 bcm2835_mci_read(struct bcm2835_mci_host *host, u32 reg)
  * register is not affected by the twoticks_delay bug
  * and we can thus get better speed here
  */
-void bcm2835_mci_write_data(struct bcm2835_mci_host *host, u32 *p)
+static void bcm2835_mci_write_data(struct bcm2835_mci_host *host, u32 *p)
 {
 	writel(*p, host->regs + SDHCI_BUFFER);
 }
 
 /* Make a read data functions as well just to keep structure */
-void bcm2835_mci_read_data(struct bcm2835_mci_host *host, u32 *p)
+static void bcm2835_mci_read_data(struct bcm2835_mci_host *host, u32 *p)
 {
 	*p = readl(host->regs + SDHCI_BUFFER);
 }
@@ -416,7 +416,7 @@ static void bcm2835_mci_set_ios(struct mci_host *mci, struct mci_ios *ios)
 			host->bus_width, host->clock);
 }
 
-int bcm2835_mci_reset(struct mci_host *mci, struct device_d *mci_dev)
+static int bcm2835_mci_reset(struct mci_host *mci, struct device_d *mci_dev)
 {
 	struct bcm2835_mci_host *host;
 	u32 ret = 0;
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH v1 3/3] amba: pl011: make locally used functions static
  2019-01-15 10:34 [PATCH v1 1/3] ARM: rpi: make locally used functions static Roland Hieber
  2019-01-15 10:34 ` [PATCH v1 2/3] mci: bcm2835: " Roland Hieber
@ 2019-01-15 10:34 ` Roland Hieber
  2019-02-14 13:51   ` Roland Hieber
  2019-01-16  7:52 ` [PATCH v1 1/3] ARM: rpi: " Sascha Hauer
  2 siblings, 1 reply; 7+ messages in thread
From: Roland Hieber @ 2019-01-15 10:34 UTC (permalink / raw)
  To: barebox; +Cc: Roland Hieber

This function is not part of a public interface and only used locally.

Fixes the following build warning:

    .../drivers/serial/amba-pl011.c:151:5: warning: no previous prototype for 'pl011_init_port' [-Wmissing-prototypes]
     int pl011_init_port (struct console_device *cdev)
         ^~~~~~~~~~~~~~~

Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
 drivers/serial/amba-pl011.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c
index 4c4067d5b5..99b82e3c03 100644
--- a/drivers/serial/amba-pl011.c
+++ b/drivers/serial/amba-pl011.c
@@ -148,7 +148,7 @@ static void pl011_rlcr(struct amba_uart_port *uart, u32 lcr)
 	}
 }
 
-int pl011_init_port (struct console_device *cdev)
+static int pl011_init_port(struct console_device *cdev)
 {
 	struct amba_uart_port *uart = to_amba_uart_port(cdev);
 
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH v1 1/3] ARM: rpi: make locally used functions static
  2019-01-15 10:34 [PATCH v1 1/3] ARM: rpi: make locally used functions static Roland Hieber
  2019-01-15 10:34 ` [PATCH v1 2/3] mci: bcm2835: " Roland Hieber
  2019-01-15 10:34 ` [PATCH v1 3/3] amba: pl011: " Roland Hieber
@ 2019-01-16  7:52 ` Sascha Hauer
  2 siblings, 0 replies; 7+ messages in thread
From: Sascha Hauer @ 2019-01-16  7:52 UTC (permalink / raw)
  To: Roland Hieber; +Cc: barebox

On Tue, Jan 15, 2019 at 11:34:21AM +0100, Roland Hieber wrote:
> These functions are not meant to be a public interface, so they can well
> be static. rpi_b_plus_init() was previously declared with a prototype,
> which is no longer needed.
> 
> This fixes the following build warnings:
> 
>     .../arch/arm/boards/raspberry-pi/rpi-common.c:124:6: warning: no previous prototype for 'rpi_add_led' [-Wmissing-prototypes]
>      void rpi_add_led(void)
>           ^~~~~~~~~~~
>     .../arch/arm/boards/raspberry-pi/rpi-common.c:141:6: warning: no previous prototype for 'rpi_b_init' [-Wmissing-prototypes]
>      void rpi_b_init(void)
> 
> Signed-off-by: Roland Hieber <rhi@pengutronix.de>
> ---

Applied, thanks

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH v1 3/3] amba: pl011: make locally used functions static
  2019-01-15 10:34 ` [PATCH v1 3/3] amba: pl011: " Roland Hieber
@ 2019-02-14 13:51   ` Roland Hieber
  2019-02-18  8:52     ` Sascha Hauer
  0 siblings, 1 reply; 7+ messages in thread
From: Roland Hieber @ 2019-02-14 13:51 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Hi Sascha,

the other two patches in this series are on master now, but this one
seems to have fallen through the cracks.

 - Roland

On Tue, Jan 15, 2019 at 11:34:23AM +0100, Roland Hieber wrote:
> This function is not part of a public interface and only used locally.
> 
> Fixes the following build warning:
> 
>     .../drivers/serial/amba-pl011.c:151:5: warning: no previous prototype for 'pl011_init_port' [-Wmissing-prototypes]
>      int pl011_init_port (struct console_device *cdev)
>          ^~~~~~~~~~~~~~~
> 
> Signed-off-by: Roland Hieber <rhi@pengutronix.de>
> ---
>  drivers/serial/amba-pl011.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c
> index 4c4067d5b5..99b82e3c03 100644
> --- a/drivers/serial/amba-pl011.c
> +++ b/drivers/serial/amba-pl011.c
> @@ -148,7 +148,7 @@ static void pl011_rlcr(struct amba_uart_port *uart, u32 lcr)
>  	}
>  }
>  
> -int pl011_init_port (struct console_device *cdev)
> +static int pl011_init_port(struct console_device *cdev)
>  {
>  	struct amba_uart_port *uart = to_amba_uart_port(cdev);
>  
> -- 
> 2.20.1
> 
> 

-- 
Roland Hieber                     | r.hieber@pengutronix.de     |
Pengutronix e.K.                  | https://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim | Phone: +49-5121-206917-5086 |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH v1 3/3] amba: pl011: make locally used functions static
  2019-02-14 13:51   ` Roland Hieber
@ 2019-02-18  8:52     ` Sascha Hauer
  2019-02-22  9:23       ` Roland Hieber
  0 siblings, 1 reply; 7+ messages in thread
From: Sascha Hauer @ 2019-02-18  8:52 UTC (permalink / raw)
  To: Roland Hieber; +Cc: barebox

On Thu, Feb 14, 2019 at 02:51:57PM +0100, Roland Hieber wrote:
> Hi Sascha,
> 
> the other two patches in this series are on master now, but this one
> seems to have fallen through the cracks.

Not really. Your patch indeed isn't applied, but we got the same from
Sam: 864fb024cf ("serial: amba-pl011: fix "no previous prototype for
'pl011_init_port'" warning")

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH v1 3/3] amba: pl011: make locally used functions static
  2019-02-18  8:52     ` Sascha Hauer
@ 2019-02-22  9:23       ` Roland Hieber
  0 siblings, 0 replies; 7+ messages in thread
From: Roland Hieber @ 2019-02-22  9:23 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

On Mon, Feb 18, 2019 at 09:52:17AM +0100, Sascha Hauer wrote:
> On Thu, Feb 14, 2019 at 02:51:57PM +0100, Roland Hieber wrote:
> > Hi Sascha,
> > 
> > the other two patches in this series are on master now, but this one
> > seems to have fallen through the cracks.
> 
> Not really. Your patch indeed isn't applied, but we got the same from
> Sam: 864fb024cf ("serial: amba-pl011: fix "no previous prototype for
> 'pl011_init_port'" warning")

Ahh, that's the things you don't notice when creating patches on top of
an old master :-) Thanks for your explanation!

 - Roland

-- 
Roland Hieber                     | r.hieber@pengutronix.de     |
Pengutronix e.K.                  | https://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim | Phone: +49-5121-206917-5086 |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2019-02-22  9:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-15 10:34 [PATCH v1 1/3] ARM: rpi: make locally used functions static Roland Hieber
2019-01-15 10:34 ` [PATCH v1 2/3] mci: bcm2835: " Roland Hieber
2019-01-15 10:34 ` [PATCH v1 3/3] amba: pl011: " Roland Hieber
2019-02-14 13:51   ` Roland Hieber
2019-02-18  8:52     ` Sascha Hauer
2019-02-22  9:23       ` Roland Hieber
2019-01-16  7:52 ` [PATCH v1 1/3] ARM: rpi: " Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox