Skip to contentSkip to conversation

linux-next: build failure after merge of the omap_dss2 tree

PATCH Applied Stephen Rothwell 4 participants 8 messages Nov 17, 2014 – Nov 26, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Hi Tomi,

After merging the omap_dss2 tree, today's linux-next build (powerpc allyesconfig) failed like this:

drivers/video/fbdev/simplefb.c: In function 'simplefb_clocks_init':
drivers/video/fbdev/simplefb.c:207:2: error: implicit declaration of function 'of_clk_get_parent_count' [-Werror=implicit-function-declaration]
par->clk_count = of_clk_get_parent_count(np);
^

Caused by commit fc219bfd5b2e ("simplefb: add clock handling code"). This build does not have CONFIG_COMMON_CLK set.

I have added the following fix for today (there is probably a better one):

From: Stephen Rothwell <[email protected]>
Date: Mon, 17 Nov 2014 19:05:42 +1100
Subject: [PATCH] simplefb: make it depend on CONFIG_COMMON_CLK

---
 drivers/video/fbdev/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/video/fbdev/Kconfig +1 -0
index 025b439d4fe1..1f0298e166c3 100644
@@ -2457,6 +2457,7 @@ config FB_HYPERV
 config FB_SIMPLE
 	bool "Simple framebuffer support"
 	depends on (FB = y)
+	depends on COMMON_CLK
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
Signature · 5 lines
2.1.3

-- 
Cheers,
Stephen Rothwell                    [email protected]
#1 lore raw

Hi,

Thanks Stephen!

Hans, have you had a look at this? kbuild test bot also reported this.

Tomi

Quoted 38 lines · Stephen Rothwell

Hi Tomi,

After merging the omap_dss2 tree, today's linux-next build (powerpc allyesconfig) failed like this:

drivers/video/fbdev/simplefb.c: In function 'simplefb_clocks_init':
drivers/video/fbdev/simplefb.c:207:2: error: implicit declaration of function 'of_clk_get_parent_count' [-Werror=implicit-function-declaration]
par->clk_count = of_clk_get_parent_count(np);
^

Caused by commit fc219bfd5b2e ("simplefb: add clock handling code"). This build does not have CONFIG_COMMON_CLK set.

I have added the following fix for today (there is probably a better one):

From: Stephen Rothwell <[email protected]>
Date: Mon, 17 Nov 2014 19:05:42 +1100
Subject: [PATCH] simplefb: make it depend on CONFIG_COMMON_CLK

---
 drivers/video/fbdev/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/video/fbdev/Kconfig +1 -0
index 025b439d4fe1..1f0298e166c3 100644
@@ -2457,6 +2457,7 @@ config FB_HYPERV
 config FB_SIMPLE
 	bool "Simple framebuffer support"
 	depends on (FB = y)
+	depends on COMMON_CLK
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
#2 lore raw

Hi

Quoted 5 lines · Tomi Valkeinen

Hi,

Thanks Stephen!

Hans, have you had a look at this? kbuild test bot also reported this.

The fix from Stephen should not go to main-line. It breaks simplefb on x86 without OF. Imo, linux/clk.h should provide a fallback if OF is not defined (like it already does for of_clk_get() and friends).

Hans, any comments?

Thanks
David

#3 lore raw
Quoted 7 lines · David Herrmann

Hi

Quoted 4 lines · Tomi Valkeinen

Hi,

Thanks Stephen!

Quoted 7 lines
Quoted 1 line

Hans, have you had a look at this? kbuild test bot also reported this.

The fix from Stephen should not go to main-line. It breaks simplefb on x86 without OF. Imo, linux/clk.h should provide a fallback if OF is not defined (like it already does for of_clk_get() and friends).

Hans, any comments?

Hans, ping.

Tomi

#4 lore raw

Hi Tomi,

Quoted 10 lines · Tomi Valkeinen
Quoted 9 lines · David Herrmann

Hi

Quoted 5 lines · Tomi Valkeinen

Hi,

Thanks Stephen!

Hans, have you had a look at this? kbuild test bot also reported this.

Quoted 7 lines
Quoted 5 lines

The fix from Stephen should not go to main-line. It breaks simplefb on x86 without OF. Imo, linux/clk.h should provide a fallback if OF is not defined (like it already does for of_clk_get() and friends).

Hans, any comments?

Hans, ping.

Sorry I somehow missed this thread so far, I did see the kbuild mail, but it looked like a false positive to me, for the compile error case I already fixed in the last revision of the patch, adding #ifdef CONFIG_OF around the offending code.

But on closer inspection I see that the entirety of linux/clk-provider.h is wrapped in one huge #ifdef CONFIG_COMMON_CLK and then later on also has:

#ifdef CONFIG_OF
...
int of_clk_get_parent_count(struct device_node *np);
...
#endif

So we need both CONFIG_OF and CONFIG_COMMON_CLK, the attached patch should fix this.

Regards,

Hans

Quoted 1 line

From 8ba38cd5ab635b67a50f8051ce2bdbcfa79253a2 Mon Sep 17 00:00:00 2001

From: Hans de Goede <[email protected]>
Date: Tue, 25 Nov 2014 12:13:30 +0100
Subject: [PATCH v2] simplefb: Fix build errors when CONFIG_COMMON_CLK is not
defined

Both CONFIG_OF and CONFIG_COMMON_CLK must be defined to be able to use of clocks.

---
 drivers/video/fbdev/simplefb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/video/fbdev/simplefb.c +2 -2
index 8be9754..b2ae925 100644
@@ -169,13 +169,13 @@ static int simplefb_parse_pd(struct platform_device *pdev,
 
 struct simplefb_par {
 	u32 palette[PSEUDO_PALETTE_SIZE];
-#ifdef CONFIG_OF
+#if defined CONFIG_OF && defined CONFIG_COMMON_CLK
 	int clk_count;
 	struct clk **clks;
 #endif
 };
 
-#ifdef CONFIG_OF
+#if defined CONFIG_OF && defined CONFIG_COMMON_CLK
 /*
  * Clock handling code.
  *
Signature · 1 line
2.1.0
#5 lore raw
Quoted 32 lines · Hans de Goede

Hi Tomi,

Quoted 11 lines · Tomi Valkeinen
Quoted 10 lines · David Herrmann

Hi

Quoted 5 lines · Tomi Valkeinen

Hi,

Thanks Stephen!

Hans, have you had a look at this? kbuild test bot also reported this.

Quoted 7 lines
Quoted 5 lines

The fix from Stephen should not go to main-line. It breaks simplefb on x86 without OF. Imo, linux/clk.h should provide a fallback if OF is not defined (like it already does for of_clk_get() and friends).

Hans, any comments?

Hans, ping.

Sorry I somehow missed this thread so far, I did see the kbuild mail, but it looked like a false positive to me, for the compile error case I already fixed
in the last revision of the patch, adding #ifdef CONFIG_OF around the offending code.

But on closer inspection I see that the entirety of linux/clk-provider.h is wrapped
in one huge #ifdef CONFIG_COMMON_CLK and then later on also has:

Quoted 8 lines

#ifdef CONFIG_OF
...
int of_clk_get_parent_count(struct device_node *np);
...
#endif

So we need both CONFIG_OF and CONFIG_COMMON_CLK, the attached patch should fix this.

Thanks, applied.

Tomi

#6 lore raw

Hi Tomi,

Quoted 37 lines · On Tue, 25 Nov 2014 14:11:59 +0200 Tomi Valkeinen <[email protected]> wrote:
Quoted 35 lines · Hans de Goede
Quoted 9 lines · Tomi Valkeinen
Quoted 8 lines · David Herrmann
Quoted 4 lines · Tomi Valkeinen

Thanks Stephen!

Hans, have you had a look at this? kbuild test bot also reported this.

Quoted 7 lines
Quoted 5 lines

The fix from Stephen should not go to main-line. It breaks simplefb on x86 without OF. Imo, linux/clk.h should provide a fallback if OF is not defined (like it already does for of_clk_get() and friends).

Hans, any comments?

Hans, ping.

Sorry I somehow missed this thread so far, I did see the kbuild mail, but it looked like a false positive to me, for the compile error case I already fixed
in the last revision of the patch, adding #ifdef CONFIG_OF around the offending code.

But on closer inspection I see that the entirety of linux/clk-provider.h is wrapped
in one huge #ifdef CONFIG_COMMON_CLK and then later on also has:

#ifdef CONFIG_OF
...
int of_clk_get_parent_count(struct device_node *np);
...
#endif

Quoted 4 lines
Quoted 2 lines

So we need both CONFIG_OF and CONFIG_COMMON_CLK, the attached patch should fix this.

Thanks, applied.

But not pushed out, yet? Just checking that you haven't pushed on purpose.

Signature · 2 lines
Cheers,
Stephen Rothwell                    [email protected]
#7 lore raw
Quoted 7 lines · Stephen Rothwell
Quoted 4 lines
Quoted 2 lines

So we need both CONFIG_OF and CONFIG_COMMON_CLK, the attached patch should fix this.

Thanks, applied.

But not pushed out, yet? Just checking that you haven't pushed on purpose.

Not yet. I'll be pushing today.

Tomi