SMDK5250: Fix compiler warning for non-dt systems
Subsystems (2)
PATCH 1/2 SMDK5250: Fix compiler warning for non-dt systems
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.
--- board/samsung/smdk5250/smdk5250.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
board/samsung/smdk5250/smdk5250.c +2 -1
@@ -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__);
Signature · 1 line
1.7.6.5
PATCH 2/2 spi: exynos: Fix compiler warnings for non-dt systems
Enclosing process_nodes() and spi_get_config() inside CONFIG_OF_CONTROL, since they are compiled only for DT systems.
This fixes following warning:
exynos_spi.c:391:12: warning: 'process_nodes' defined but not used [-Wunused-function]
--- drivers/spi/exynos_spi.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/spi/exynos_spi.c +2 -0
@@ -360,6 +360,7 @@ static inline struct exynos_spi *get_spi_base(int dev_index)* @param bus SPI bus structure to fill with information * @return 0 if ok, or -FDT_ERR_NOTFOUND if something was missing */ +#ifdef CONFIG_OF_CONTROL static int spi_get_config (const void *blob,int node,struct spi_bus *bus) { bus->node = node;
@@ -415,6 +416,7 @@ static int process_nodes(const void *blob, int node_list[], int count) return 0; } +#endif /* Sadly there is no error return from this function */ void spi_init (void )
Signature · 1 line
1.7.6.5
PATCH 2/2 spi: exynos: Fix compiler warnings for non-dt systems
Quoted 7 lines · Vivek Gautam
Enclosing
process_nodes()andspi_get_config()insideCONFIG_OF_CONTROL, since they are compiled only for DT systems.This fixes following warning:
exynos_spi.c:391:12: warning: 'process_nodes' defined but not used [-Wunused-function]Signed-off-by Vivek Gautam <[email protected]>
Quoted 27 lines
--- drivers/spi/exynos_spi.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)drivers/spi/exynos_spi.c +2
-1@@ -360,6 +360,7 @@ static inline struct exynos_spi *get_spi_base(int dev_index)* @param bus SPI bus structure to fill with information * @return 0 if ok, or -FDT_ERR_NOTFOUND if something was missing */ +#ifdef CONFIG_OF_CONTROL static int spi_get_config (const void *blob,int node,struct spi_bus *bus) { bus->node = node;@@ -415,6 +416,7 @@ static int process_nodes(const void *blob, int node_list[], int count) return 0; } +#endif /* Sadly there is no error return from this function */ void spi_init (void ) --1.7.6.5
PATCH 2/2 spi: exynos: Fix compiler warnings for non-dt systems
In reply to Vivek GautamQuoted 25 lines · Vivek Gautam
Enclosing
process_nodes()andspi_get_config()insideCONFIG_OF_CONTROL, since they are compiled only for DT systems.This fixes following warning:
exynos_spi.c:391:12: warning: 'process_nodes' defined but not used [-Wunused-function]Signed-off-by Vivek Gautam <[email protected]>--- drivers/spi/exynos_spi.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)drivers/spi/exynos_spi.c +1
-0@@ -360,6 +360,7 @@ static inline struct exynos_spi *get_spi_base(int dev_index)* @param bus SPI bus structure to fill with information * @return 0 if ok, or -FDT_ERR_NOTFOUND if something was missing */ +#ifdef CONFIG_OF_CONTROL static int spi_get_config (const void *blob,int node,struct spi_bus *bus) { bus->node = node;
drivers/spi/exynos_spi.c static int process_nodes(const void *blob, int node_list[], int count) · line 422
Quoted 7 lines
drivers/spi/exynos_spi.c +1
-0@@ -415,6 +416,7 @@ static int process_nodes(const void *blob, int node_list[], int count) return 0; } +#endif /* Sadly there is no error return from this function */ void spi_init (void )
applied to u-boot-samsung.
Thanks,
Minkyu Kang.
PATCH 1/2 SMDK5250: Fix compiler warning for non-dt systems
In reply to Vivek GautamQuoted 8 lines · Vivek Gautam
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 <[email protected]>
Quoted 23 lines
--- board/samsung/smdk5250/smdk5250.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)board/samsung/smdk5250/smdk5250.c +2
-2@@ -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
PATCH 1/2 SMDK5250: Fix compiler warning for non-dt systems
In reply to Vivek GautamQuoted 19 lines · Vivek Gautam
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 <[email protected]>--- board/samsung/smdk5250/smdk5250.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)board/samsung/smdk5250/smdk5250.c +0
-0@@ -149,9 +149,10 @@ int board_eth_init(bd_t *bis)u32 smc_bw_conf, smc_bc_conf;
board/samsung/smdk5250/smdk5250.c int board_eth_init(bd_t *bis) · line 158
Quoted 10 lines
board/samsung/smdk5250/smdk5250.c +2
-1struct 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__);
applied to u-boot-samsung.
Thanks,
Minkyu Kang.