diff mbox

[U-Boot,17/17] m5253demo: Fix static variable in non-static inline function warning

Message ID 1494296075-29477-17-git-send-email-trini@konsulko.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Tom Rini May 9, 2017, 2:14 a.m. UTC
The function 'spin_wheel' is declared as inline, but not static and thus
we see warnings that 'w' and 'p' are declared static in a non-static
inline function.  Correct this by marking spin_wheel as static inline.

Cc: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
 board/freescale/m5253demo/flash.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Tom Rini May 12, 2017, 5:23 p.m. UTC | #1
On Mon, May 08, 2017 at 10:14:35PM -0400, Tom Rini wrote:

> The function 'spin_wheel' is declared as inline, but not static and thus
> we see warnings that 'w' and 'p' are declared static in a non-static
> inline function.  Correct this by marking spin_wheel as static inline.
> 
> Cc: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
> Signed-off-by: Tom Rini <trini@konsulko.com>

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

Patch

diff --git a/board/freescale/m5253demo/flash.c b/board/freescale/m5253demo/flash.c
index 071701d23436..099decabb892 100644
--- a/board/freescale/m5253demo/flash.c
+++ b/board/freescale/m5253demo/flash.c
@@ -31,7 +31,7 @@  typedef volatile unsigned short FLASH_PORT_WIDTHV;
 ulong flash_get_size(FPWV * addr, flash_info_t * info);
 int flash_get_offsets(ulong base, flash_info_t * info);
 int write_word(flash_info_t * info, FPWV * dest, u16 data);
-void inline spin_wheel(void);
+static inline void spin_wheel(void);
 
 flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS];
 
@@ -439,7 +439,7 @@  int write_word(flash_info_t * info, FPWV * dest, u16 data)
 	return (res);
 }
 
-void inline spin_wheel(void)
+static inline void spin_wheel(void)
 {
 	static int p = 0;
 	static char w[] = "\\/-";