All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/2] blackfin: fix warnings
@ 2013-10-21  1:14 Masahiro Yamada
  2013-10-21  1:14 ` [U-Boot] [PATCH 1/2] blackfin: fix a warning in arch/blackfin/cpu/initcode.c Masahiro Yamada
  2013-10-21  1:14 ` [U-Boot] [PATCH 2/2] blackfin: fix a warning in arch/blackfin/cpu/cpu.c Masahiro Yamada
  0 siblings, 2 replies; 6+ messages in thread
From: Masahiro Yamada @ 2013-10-21  1:14 UTC (permalink / raw)
  To: u-boot

This series warnings under arch/blackfin/

Cc: Sonic Zhang <sonic.zhang@analog.com>

Masahiro Yamada (2):
  blackfin: fix a warning in arch/blackfin/cpu/initcode.c
  blackfin: fix a warning in arch/blackfin/cpu/cpu.c

 arch/blackfin/cpu/cpu.c      | 3 +++
 arch/blackfin/cpu/initcode.c | 6 ++----
 2 files changed, 5 insertions(+), 4 deletions(-)

-- 
1.8.1.2

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

* [U-Boot] [PATCH 1/2] blackfin: fix a warning in arch/blackfin/cpu/initcode.c
  2013-10-21  1:14 [U-Boot] [PATCH 0/2] blackfin: fix warnings Masahiro Yamada
@ 2013-10-21  1:14 ` Masahiro Yamada
  2013-10-22  7:19   ` Sonic Zhang
  2013-10-21  1:14 ` [U-Boot] [PATCH 2/2] blackfin: fix a warning in arch/blackfin/cpu/cpu.c Masahiro Yamada
  1 sibling, 1 reply; 6+ messages in thread
From: Masahiro Yamada @ 2013-10-21  1:14 UTC (permalink / raw)
  To: u-boot

This commit fixes:
    initcode.c:150: warning: unused variable ?uart_base?

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Sonic Zhang <sonic.zhang@analog.com>
---
 arch/blackfin/cpu/initcode.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/blackfin/cpu/initcode.c b/arch/blackfin/cpu/initcode.c
index ffaf101..956f158 100644
--- a/arch/blackfin/cpu/initcode.c
+++ b/arch/blackfin/cpu/initcode.c
@@ -147,8 +147,6 @@ static struct ddr_config ddr_config_table[] = {
 __attribute__((always_inline))
 static inline void serial_init(void)
 {
-	uint32_t uart_base = UART_BASE;
-
 #if defined(__ADSPBF54x__) || defined(__ADSPBF60x__)
 # ifdef BFIN_BOOT_UART_USE_RTS
 #  define BFIN_UART_USE_RTS 1
@@ -195,8 +193,8 @@ static inline void serial_init(void)
 
 #if CONFIG_BFIN_BOOT_MODE != BFIN_BOOT_BYPASS
 	if (BFIN_DEBUG_EARLY_SERIAL) {
-		serial_early_init(uart_base);
-		serial_early_set_baud(uart_base, CONFIG_BAUDRATE);
+		serial_early_init(UART_BASE);
+		serial_early_set_baud(UART_BASE, CONFIG_BAUDRATE);
 	}
 #endif
 }
-- 
1.8.1.2

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

* [U-Boot] [PATCH 2/2] blackfin: fix a warning in arch/blackfin/cpu/cpu.c
  2013-10-21  1:14 [U-Boot] [PATCH 0/2] blackfin: fix warnings Masahiro Yamada
  2013-10-21  1:14 ` [U-Boot] [PATCH 1/2] blackfin: fix a warning in arch/blackfin/cpu/initcode.c Masahiro Yamada
@ 2013-10-21  1:14 ` Masahiro Yamada
  2013-10-22  7:21   ` Sonic Zhang
  1 sibling, 1 reply; 6+ messages in thread
From: Masahiro Yamada @ 2013-10-21  1:14 UTC (permalink / raw)
  To: u-boot

This commit fixes:
    cpu.c:107: warning: ?noreturn? function does return

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Sonic Zhang <sonic.zhang@analog.com>
---
 arch/blackfin/cpu/cpu.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/blackfin/cpu/cpu.c b/arch/blackfin/cpu/cpu.c
index 218f57e..2409c30 100644
--- a/arch/blackfin/cpu/cpu.c
+++ b/arch/blackfin/cpu/cpu.c
@@ -104,6 +104,9 @@ void cpu_init_f(ulong bootflag, ulong loaded_from_ldr)
 
 	serial_early_puts("Board init flash\n");
 	board_init_f(bootflag);
+
+	/* should not be reached */
+	while (1);
 }
 
 int exception_init(void)
-- 
1.8.1.2

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

* [U-Boot] [PATCH 1/2] blackfin: fix a warning in arch/blackfin/cpu/initcode.c
  2013-10-21  1:14 ` [U-Boot] [PATCH 1/2] blackfin: fix a warning in arch/blackfin/cpu/initcode.c Masahiro Yamada
@ 2013-10-22  7:19   ` Sonic Zhang
  2013-10-22 10:13     ` Masahiro Yamada
  0 siblings, 1 reply; 6+ messages in thread
From: Sonic Zhang @ 2013-10-22  7:19 UTC (permalink / raw)
  To: u-boot

Hi Masahiro,

NAK.

The variable uart_base is used in macro pUART in function serial_init().


#define pUART ((volatile struct bfin_mmr_serial *)uart_base)


Regards,

Sonic

On Mon, Oct 21, 2013 at 9:14 AM, Masahiro Yamada
<yamada.m@jp.panasonic.com> wrote:
> This commit fixes:
>     initcode.c:150: warning: unused variable ?uart_base?
>
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> Cc: Sonic Zhang <sonic.zhang@analog.com>
> ---
>  arch/blackfin/cpu/initcode.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/arch/blackfin/cpu/initcode.c b/arch/blackfin/cpu/initcode.c
> index ffaf101..956f158 100644
> --- a/arch/blackfin/cpu/initcode.c
> +++ b/arch/blackfin/cpu/initcode.c
> @@ -147,8 +147,6 @@ static struct ddr_config ddr_config_table[] = {
>  __attribute__((always_inline))
>  static inline void serial_init(void)
>  {
> -       uint32_t uart_base = UART_BASE;
> -
>  #if defined(__ADSPBF54x__) || defined(__ADSPBF60x__)
>  # ifdef BFIN_BOOT_UART_USE_RTS
>  #  define BFIN_UART_USE_RTS 1
> @@ -195,8 +193,8 @@ static inline void serial_init(void)
>
>  #if CONFIG_BFIN_BOOT_MODE != BFIN_BOOT_BYPASS
>         if (BFIN_DEBUG_EARLY_SERIAL) {
> -               serial_early_init(uart_base);
> -               serial_early_set_baud(uart_base, CONFIG_BAUDRATE);
> +               serial_early_init(UART_BASE);
> +               serial_early_set_baud(UART_BASE, CONFIG_BAUDRATE);
>         }
>  #endif
>  }
> --
> 1.8.1.2
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

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

* [U-Boot] [PATCH 2/2] blackfin: fix a warning in arch/blackfin/cpu/cpu.c
  2013-10-21  1:14 ` [U-Boot] [PATCH 2/2] blackfin: fix a warning in arch/blackfin/cpu/cpu.c Masahiro Yamada
@ 2013-10-22  7:21   ` Sonic Zhang
  0 siblings, 0 replies; 6+ messages in thread
From: Sonic Zhang @ 2013-10-22  7:21 UTC (permalink / raw)
  To: u-boot

Applied.

Thanks.

Sonic

On Mon, Oct 21, 2013 at 9:14 AM, Masahiro Yamada
<yamada.m@jp.panasonic.com> wrote:
> This commit fixes:
>     cpu.c:107: warning: ?noreturn? function does return
>
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> Cc: Sonic Zhang <sonic.zhang@analog.com>
> ---
>  arch/blackfin/cpu/cpu.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/arch/blackfin/cpu/cpu.c b/arch/blackfin/cpu/cpu.c
> index 218f57e..2409c30 100644
> --- a/arch/blackfin/cpu/cpu.c
> +++ b/arch/blackfin/cpu/cpu.c
> @@ -104,6 +104,9 @@ void cpu_init_f(ulong bootflag, ulong loaded_from_ldr)
>
>         serial_early_puts("Board init flash\n");
>         board_init_f(bootflag);
> +
> +       /* should not be reached */
> +       while (1);
>  }
>
>  int exception_init(void)
> --
> 1.8.1.2
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

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

* [U-Boot] [PATCH 1/2] blackfin: fix a warning in arch/blackfin/cpu/initcode.c
  2013-10-22  7:19   ` Sonic Zhang
@ 2013-10-22 10:13     ` Masahiro Yamada
  0 siblings, 0 replies; 6+ messages in thread
From: Masahiro Yamada @ 2013-10-22 10:13 UTC (permalink / raw)
  To: u-boot

Hello, Sonic.


> The variable uart_base is used in macro pUART in function serial_init().
> 
> 
> #define pUART ((volatile struct bfin_mmr_serial *)uart_base)

This macro is weird.
It expects the variable name 'uart_base'.
I think it's better not to use it.

Best Regards
Masahiro Yamada

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

end of thread, other threads:[~2013-10-22 10:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-21  1:14 [U-Boot] [PATCH 0/2] blackfin: fix warnings Masahiro Yamada
2013-10-21  1:14 ` [U-Boot] [PATCH 1/2] blackfin: fix a warning in arch/blackfin/cpu/initcode.c Masahiro Yamada
2013-10-22  7:19   ` Sonic Zhang
2013-10-22 10:13     ` Masahiro Yamada
2013-10-21  1:14 ` [U-Boot] [PATCH 2/2] blackfin: fix a warning in arch/blackfin/cpu/cpu.c Masahiro Yamada
2013-10-22  7:21   ` Sonic Zhang

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.