diff mbox

[1/2] SMDK5250: Fix compiler warning for non-dt systems

Message ID 1360737762-14056-1-git-send-email-gautam.vivek@samsung.com
State Superseded
Headers show

Commit Message

Vivek Gautam Feb. 13, 2013, 6:42 a.m. UTC
Compiling for non-dt systems gives folowing warning:
smdk5250.c: In function 'board_eth_init':
smdk5250.c:152:6: warning: unused variable 'node' [-Wunused-variable]

Declare variable 'node' only for dt enabled systems to remove this
warning.

Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
---
 board/samsung/smdk5250/smdk5250.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Comments

Simon Glass Feb. 14, 2013, 4:47 a.m. UTC | #1
On Tue, Feb 12, 2013 at 10:42 PM, Vivek Gautam <gautam.vivek@samsung.com> wrote:
> Compiling for non-dt systems gives folowing warning:
> smdk5250.c: In function 'board_eth_init':
> smdk5250.c:152:6: warning: unused variable 'node' [-Wunused-variable]
>
> Declare variable 'node' only for dt enabled systems to remove this
> warning.
>
> Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>

Acked-by: Simon Glass <sjg@chromium.org>

> ---
>  board/samsung/smdk5250/smdk5250.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/board/samsung/smdk5250/smdk5250.c b/board/samsung/smdk5250/smdk5250.c
> index 7a5f132..2fa771e 100644
> --- a/board/samsung/smdk5250/smdk5250.c
> +++ b/board/samsung/smdk5250/smdk5250.c
> @@ -149,9 +149,10 @@ int board_eth_init(bd_t *bis)
>         u32 smc_bw_conf, smc_bc_conf;
>         struct fdt_sromc config;
>         fdt_addr_t base_addr;
> -       int node;
>
>  #ifdef CONFIG_OF_CONTROL
> +       int node;
> +
>         node = decode_sromc(gd->fdt_blob, &config);
>         if (node < 0) {
>                 debug("%s: Could not find sromc configuration\n", __func__);
> --
> 1.7.6.5
>
diff mbox

Patch

diff --git a/board/samsung/smdk5250/smdk5250.c b/board/samsung/smdk5250/smdk5250.c
index 7a5f132..2fa771e 100644
--- a/board/samsung/smdk5250/smdk5250.c
+++ b/board/samsung/smdk5250/smdk5250.c
@@ -149,9 +149,10 @@  int board_eth_init(bd_t *bis)
 	u32 smc_bw_conf, smc_bc_conf;
 	struct fdt_sromc config;
 	fdt_addr_t base_addr;
-	int node;
 
 #ifdef CONFIG_OF_CONTROL
+	int node;
+
 	node = decode_sromc(gd->fdt_blob, &config);
 	if (node < 0) {
 		debug("%s: Could not find sromc configuration\n", __func__);