* [U-Boot] [PATCH 2/2] spi: exynos: Fix compiler warnings for non-dt systems
2013-02-13 6:42 Vivek Gautam
@ 2013-02-13 6:42 ` Vivek Gautam
2013-02-14 4:48 ` Simon Glass
0 siblings, 1 reply; 8+ messages in thread
From: Vivek Gautam @ 2013-02-13 6:42 UTC (permalink / raw)
To: u-boot
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]
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
---
drivers/spi/exynos_spi.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/spi/exynos_spi.c b/drivers/spi/exynos_spi.c
index be60ada..2260d59 100644
--- a/drivers/spi/exynos_spi.c
+++ b/drivers/spi/exynos_spi.c
@@ -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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 2/2] spi: exynos: Fix compiler warnings for non-dt systems
2013-02-13 6:42 ` [U-Boot] [PATCH 2/2] spi: exynos: Fix compiler warnings " Vivek Gautam
@ 2013-02-14 4:48 ` Simon Glass
0 siblings, 0 replies; 8+ messages in thread
From: Simon Glass @ 2013-02-14 4:48 UTC (permalink / raw)
To: u-boot
On Tue, Feb 12, 2013 at 10:42 PM, Vivek Gautam <gautam.vivek@samsung.com> wrote:
> 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]
>
> Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
> ---
> drivers/spi/exynos_spi.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/spi/exynos_spi.c b/drivers/spi/exynos_spi.c
> index be60ada..2260d59 100644
> --- a/drivers/spi/exynos_spi.c
> +++ b/drivers/spi/exynos_spi.c
> @@ -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
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 1/2] SMDK5250: Fix compiler warning for non-dt systems
@ 2013-03-05 13:49 Vivek Gautam
2013-03-05 13:49 ` [U-Boot] [PATCH 2/2] spi: exynos: Fix compiler warnings " Vivek Gautam
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Vivek Gautam @ 2013-03-05 13:49 UTC (permalink / raw)
To: u-boot
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(-)
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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 2/2] spi: exynos: Fix compiler warnings for non-dt systems
2013-03-05 13:49 [U-Boot] [PATCH 1/2] SMDK5250: Fix compiler warning for non-dt systems Vivek Gautam
@ 2013-03-05 13:49 ` Vivek Gautam
2013-03-06 1:52 ` Simon Glass
2013-03-29 2:28 ` Minkyu Kang
2013-03-06 1:52 ` [U-Boot] [PATCH 1/2] SMDK5250: Fix compiler warning " Simon Glass
2013-03-29 2:28 ` Minkyu Kang
2 siblings, 2 replies; 8+ messages in thread
From: Vivek Gautam @ 2013-03-05 13:49 UTC (permalink / raw)
To: u-boot
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]
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
---
drivers/spi/exynos_spi.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/spi/exynos_spi.c b/drivers/spi/exynos_spi.c
index be60ada..2260d59 100644
--- a/drivers/spi/exynos_spi.c
+++ b/drivers/spi/exynos_spi.c
@@ -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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 1/2] SMDK5250: Fix compiler warning for non-dt systems
2013-03-05 13:49 [U-Boot] [PATCH 1/2] SMDK5250: Fix compiler warning for non-dt systems Vivek Gautam
2013-03-05 13:49 ` [U-Boot] [PATCH 2/2] spi: exynos: Fix compiler warnings " Vivek Gautam
@ 2013-03-06 1:52 ` Simon Glass
2013-03-29 2:28 ` Minkyu Kang
2 siblings, 0 replies; 8+ messages in thread
From: Simon Glass @ 2013-03-06 1:52 UTC (permalink / raw)
To: u-boot
On Tue, Mar 5, 2013 at 5:49 AM, 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
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 2/2] spi: exynos: Fix compiler warnings for non-dt systems
2013-03-05 13:49 ` [U-Boot] [PATCH 2/2] spi: exynos: Fix compiler warnings " Vivek Gautam
@ 2013-03-06 1:52 ` Simon Glass
2013-03-29 2:28 ` Minkyu Kang
1 sibling, 0 replies; 8+ messages in thread
From: Simon Glass @ 2013-03-06 1:52 UTC (permalink / raw)
To: u-boot
On Tue, Mar 5, 2013 at 5:49 AM, Vivek Gautam <gautam.vivek@samsung.com> wrote:
> 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]
>
> Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
> ---
> drivers/spi/exynos_spi.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/spi/exynos_spi.c b/drivers/spi/exynos_spi.c
> index be60ada..2260d59 100644
> --- a/drivers/spi/exynos_spi.c
> +++ b/drivers/spi/exynos_spi.c
> @@ -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
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 1/2] SMDK5250: Fix compiler warning for non-dt systems
2013-03-05 13:49 [U-Boot] [PATCH 1/2] SMDK5250: Fix compiler warning for non-dt systems Vivek Gautam
2013-03-05 13:49 ` [U-Boot] [PATCH 2/2] spi: exynos: Fix compiler warnings " Vivek Gautam
2013-03-06 1:52 ` [U-Boot] [PATCH 1/2] SMDK5250: Fix compiler warning " Simon Glass
@ 2013-03-29 2:28 ` Minkyu Kang
2 siblings, 0 replies; 8+ messages in thread
From: Minkyu Kang @ 2013-03-29 2:28 UTC (permalink / raw)
To: u-boot
On 05/03/13 22:49, Vivek Gautam 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>
> ---
> 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__);
>
applied to u-boot-samsung.
Thanks,
Minkyu Kang.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 2/2] spi: exynos: Fix compiler warnings for non-dt systems
2013-03-05 13:49 ` [U-Boot] [PATCH 2/2] spi: exynos: Fix compiler warnings " Vivek Gautam
2013-03-06 1:52 ` Simon Glass
@ 2013-03-29 2:28 ` Minkyu Kang
1 sibling, 0 replies; 8+ messages in thread
From: Minkyu Kang @ 2013-03-29 2:28 UTC (permalink / raw)
To: u-boot
On 05/03/13 22:49, Vivek Gautam wrote:
> 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]
>
> Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
> ---
> drivers/spi/exynos_spi.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/spi/exynos_spi.c b/drivers/spi/exynos_spi.c
> index be60ada..2260d59 100644
> --- a/drivers/spi/exynos_spi.c
> +++ b/drivers/spi/exynos_spi.c
> @@ -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)
>
applied to u-boot-samsung.
Thanks,
Minkyu Kang.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-03-29 2:28 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-05 13:49 [U-Boot] [PATCH 1/2] SMDK5250: Fix compiler warning for non-dt systems Vivek Gautam
2013-03-05 13:49 ` [U-Boot] [PATCH 2/2] spi: exynos: Fix compiler warnings " Vivek Gautam
2013-03-06 1:52 ` Simon Glass
2013-03-29 2:28 ` Minkyu Kang
2013-03-06 1:52 ` [U-Boot] [PATCH 1/2] SMDK5250: Fix compiler warning " Simon Glass
2013-03-29 2:28 ` Minkyu Kang
-- strict thread matches above, loose matches on Subject: below --
2013-02-13 6:42 Vivek Gautam
2013-02-13 6:42 ` [U-Boot] [PATCH 2/2] spi: exynos: Fix compiler warnings " Vivek Gautam
2013-02-14 4:48 ` Simon Glass
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox