diff mbox

[U-Boot,4/4] arch/arm/cpu/arm920t/ep93xx/led.c: Mark inline functions as static inline

Message ID 1448715883-14099-4-git-send-email-trini@konsulko.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Tom Rini Nov. 28, 2015, 1:04 p.m. UTC
With gcc-5.x we get warning about inline non-static functions referring to
static elements.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 arch/arm/cpu/arm920t/ep93xx/led.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Bin Meng Nov. 29, 2015, 9:34 a.m. UTC | #1
On Sat, Nov 28, 2015 at 9:04 PM, Tom Rini <trini@konsulko.com> wrote:
> With gcc-5.x we get warning about inline non-static functions referring to
> static elements.
>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
>  arch/arm/cpu/arm920t/ep93xx/led.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/cpu/arm920t/ep93xx/led.c b/arch/arm/cpu/arm920t/ep93xx/led.c
> index 6144729..ecceb98 100644
> --- a/arch/arm/cpu/arm920t/ep93xx/led.c
> +++ b/arch/arm/cpu/arm920t/ep93xx/led.c
> @@ -13,7 +13,7 @@ static uint8_t saved_state[2] = {STATUS_LED_OFF, STATUS_LED_OFF};
>  static uint32_t gpio_pin[2] = {1 << STATUS_LED_GREEN,
>                                1 << STATUS_LED_RED};
>
> -inline void switch_LED_on(uint8_t led)
> +static inline void switch_LED_on(uint8_t led)
>  {
>         register struct gpio_regs *gpio = (struct gpio_regs *)GPIO_BASE;
>
> @@ -21,7 +21,7 @@ inline void switch_LED_on(uint8_t led)
>         saved_state[led] = STATUS_LED_ON;
>  }
>
> -inline void switch_LED_off(uint8_t led)
> +static inline void switch_LED_off(uint8_t led)
>  {
>         register struct gpio_regs *gpio = (struct gpio_regs *)GPIO_BASE;
>
> --

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tom Rini Dec. 6, 2015, 10:07 p.m. UTC | #2
On Sat, Nov 28, 2015 at 08:04:43AM -0500, Tom Rini wrote:

> With gcc-5.x we get warning about inline non-static functions referring to
> static elements.
> 
> Signed-off-by: Tom Rini <trini@konsulko.com>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/arch/arm/cpu/arm920t/ep93xx/led.c b/arch/arm/cpu/arm920t/ep93xx/led.c
index 6144729..ecceb98 100644
--- a/arch/arm/cpu/arm920t/ep93xx/led.c
+++ b/arch/arm/cpu/arm920t/ep93xx/led.c
@@ -13,7 +13,7 @@  static uint8_t saved_state[2] = {STATUS_LED_OFF, STATUS_LED_OFF};
 static uint32_t gpio_pin[2] = {1 << STATUS_LED_GREEN,
 			       1 << STATUS_LED_RED};
 
-inline void switch_LED_on(uint8_t led)
+static inline void switch_LED_on(uint8_t led)
 {
 	register struct gpio_regs *gpio = (struct gpio_regs *)GPIO_BASE;
 
@@ -21,7 +21,7 @@  inline void switch_LED_on(uint8_t led)
 	saved_state[led] = STATUS_LED_ON;
 }
 
-inline void switch_LED_off(uint8_t led)
+static inline void switch_LED_off(uint8_t led)
 {
 	register struct gpio_regs *gpio = (struct gpio_regs *)GPIO_BASE;