* [PATCH] clk: versatile: Make depend on OF when COMPILE_TEST
@ 2015-10-25 22:41 Javier Martinez Canillas
2015-10-26 9:02 ` Geert Uytterhoeven
2015-10-26 18:51 ` Stephen Boyd
0 siblings, 2 replies; 5+ messages in thread
From: Javier Martinez Canillas @ 2015-10-25 22:41 UTC (permalink / raw)
To: linux-kernel
Cc: Javier Martinez Canillas, Michael Turquette, Stephen Boyd,
Scott Branden, linux-clk
Commit 4a7748c3d641 ("clk: Allow drivers to build if COMPILE_TEST is
enabled") allowed clk drives to be compile tested on other archs but
the COMMON_CLK_VERSATILE was only enabled on platforms that already
selected OF support so the drivers assume it will always be enabled.
So, restrict compile test for these drivers only if OF is enabled.
Fixes: 4a7748c3d641 ("clk: Allow drivers to build if COMPILE_TEST is enabled")
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---
drivers/clk/versatile/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/versatile/Kconfig b/drivers/clk/versatile/Kconfig
index fc50b6264bed..e85863cf145f 100644
--- a/drivers/clk/versatile/Kconfig
+++ b/drivers/clk/versatile/Kconfig
@@ -1,6 +1,6 @@
config COMMON_CLK_VERSATILE
bool "Clock driver for ARM Reference designs"
- depends on ARCH_INTEGRATOR || ARCH_REALVIEW || ARCH_VEXPRESS || ARM64 || COMPILE_TEST
+ depends on ARCH_INTEGRATOR || ARCH_REALVIEW || ARCH_VEXPRESS || ARM64 || (COMPILE_TEST && OF)
---help---
Supports clocking on ARM Reference designs:
- Integrator/AP and Integrator/CP
--
2.4.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] clk: versatile: Make depend on OF when COMPILE_TEST
2015-10-25 22:41 [PATCH] clk: versatile: Make depend on OF when COMPILE_TEST Javier Martinez Canillas
@ 2015-10-26 9:02 ` Geert Uytterhoeven
2015-10-26 14:44 ` Javier Martinez Canillas
2015-10-26 18:51 ` Stephen Boyd
1 sibling, 1 reply; 5+ messages in thread
From: Geert Uytterhoeven @ 2015-10-26 9:02 UTC (permalink / raw)
To: Javier Martinez Canillas
Cc: linux-kernel, Michael Turquette, Stephen Boyd, Scott Branden, linux-clk
On Sun, Oct 25, 2015 at 11:41 PM, Javier Martinez Canillas
<javier@osg.samsung.com> wrote:
> Commit 4a7748c3d641 ("clk: Allow drivers to build if COMPILE_TEST is
> enabled") allowed clk drives to be compile tested on other archs but
> the COMMON_CLK_VERSATILE was only enabled on platforms that already
> selected OF support so the drivers assume it will always be enabled.
>
> So, restrict compile test for these drivers only if OF is enabled.
>
> Fixes: 4a7748c3d641 ("clk: Allow drivers to build if COMPILE_TEST is enabled")
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>
> ---
>
> drivers/clk/versatile/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/clk/versatile/Kconfig b/drivers/clk/versatile/Kconfig
> index fc50b6264bed..e85863cf145f 100644
> --- a/drivers/clk/versatile/Kconfig
> +++ b/drivers/clk/versatile/Kconfig
> @@ -1,6 +1,6 @@
> config COMMON_CLK_VERSATILE
> bool "Clock driver for ARM Reference designs"
> - depends on ARCH_INTEGRATOR || ARCH_REALVIEW || ARCH_VEXPRESS || ARM64 || COMPILE_TEST
> + depends on ARCH_INTEGRATOR || ARCH_REALVIEW || ARCH_VEXPRESS || ARM64 || (COMPILE_TEST && OF)
I would separate the infrastructure and platform dependencies, like
depends on OF
depends on ARCH_INTEGRATOR || ARCH_REALVIEW || ARCH_VEXPRESS
|| ARM64 || COMPILE_TEST
But it's of course up to the maintainer to decide.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] clk: versatile: Make depend on OF when COMPILE_TEST
2015-10-26 9:02 ` Geert Uytterhoeven
@ 2015-10-26 14:44 ` Javier Martinez Canillas
0 siblings, 0 replies; 5+ messages in thread
From: Javier Martinez Canillas @ 2015-10-26 14:44 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: linux-kernel, Michael Turquette, Stephen Boyd, Scott Branden, linux-clk
Hello Geert,
Thanks a lot for your feedback.
On 10/26/2015 06:02 PM, Geert Uytterhoeven wrote:
> On Sun, Oct 25, 2015 at 11:41 PM, Javier Martinez Canillas
> <javier@osg.samsung.com> wrote:
>> Commit 4a7748c3d641 ("clk: Allow drivers to build if COMPILE_TEST is
>> enabled") allowed clk drives to be compile tested on other archs but
>> the COMMON_CLK_VERSATILE was only enabled on platforms that already
>> selected OF support so the drivers assume it will always be enabled.
>>
>> So, restrict compile test for these drivers only if OF is enabled.
>>
>> Fixes: 4a7748c3d641 ("clk: Allow drivers to build if COMPILE_TEST is enabled")
>> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>>
>> ---
>>
>> drivers/clk/versatile/Kconfig | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/clk/versatile/Kconfig b/drivers/clk/versatile/Kconfig
>> index fc50b6264bed..e85863cf145f 100644
>> --- a/drivers/clk/versatile/Kconfig
>> +++ b/drivers/clk/versatile/Kconfig
>> @@ -1,6 +1,6 @@
>> config COMMON_CLK_VERSATILE
>> bool "Clock driver for ARM Reference designs"
>> - depends on ARCH_INTEGRATOR || ARCH_REALVIEW || ARCH_VEXPRESS || ARM64 || COMPILE_TEST
>> + depends on ARCH_INTEGRATOR || ARCH_REALVIEW || ARCH_VEXPRESS || ARM64 || (COMPILE_TEST && OF)
>
> I would separate the infrastructure and platform dependencies, like
>
> depends on OF
> depends on ARCH_INTEGRATOR || ARCH_REALVIEW || ARCH_VEXPRESS
> || ARM64 || COMPILE_TEST
>
You are right, having an explicit dependency is way better than
it implicitly and relying on the arch Kconfig to select it.
> But it's of course up to the maintainer to decide.
>
I'll wait to see Stephen and Mike opinion before sending a v2
but I agree with your suggestion.
> Gr{oetje,eeting}s,
>
> Geert
>
Best regards,
--
Javier Martinez Canillas
Open Source Group
Samsung Research America
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] clk: versatile: Make depend on OF when COMPILE_TEST
2015-10-25 22:41 [PATCH] clk: versatile: Make depend on OF when COMPILE_TEST Javier Martinez Canillas
2015-10-26 9:02 ` Geert Uytterhoeven
@ 2015-10-26 18:51 ` Stephen Boyd
2015-10-26 22:04 ` Javier Martinez Canillas
1 sibling, 1 reply; 5+ messages in thread
From: Stephen Boyd @ 2015-10-26 18:51 UTC (permalink / raw)
To: Javier Martinez Canillas
Cc: linux-kernel, Michael Turquette, Scott Branden, linux-clk
On 10/26, Javier Martinez Canillas wrote:
> Commit 4a7748c3d641 ("clk: Allow drivers to build if COMPILE_TEST is
> enabled") allowed clk drives to be compile tested on other archs but
s/drives/drivers/
> the COMMON_CLK_VERSATILE was only enabled on platforms that already
> selected OF support so the drivers assume it will always be enabled.
>
> So, restrict compile test for these drivers only if OF is enabled.
No compiler error message?
>
> Fixes: 4a7748c3d641 ("clk: Allow drivers to build if COMPILE_TEST is enabled")
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>
No Reported-by?
I'd prefer we add stubs instead, so I've applied the patch below.
---8<---
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index bbb8fed11e44..dbedee565ad7 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -691,6 +691,15 @@ static inline struct clk *of_clk_src_onecell_get(
{
return ERR_PTR(-ENOENT);
}
+static inline int of_clk_get_parent_count(struct device_node *np)
+{
+ return 0;
+}
+static inline int of_clk_parent_fill(struct device_node *np,
+ const char **parents, unsigned int size)
+{
+ return 0;
+}
static inline const char *of_clk_get_parent_name(struct device_node *np,
int index)
{
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] clk: versatile: Make depend on OF when COMPILE_TEST
2015-10-26 18:51 ` Stephen Boyd
@ 2015-10-26 22:04 ` Javier Martinez Canillas
0 siblings, 0 replies; 5+ messages in thread
From: Javier Martinez Canillas @ 2015-10-26 22:04 UTC (permalink / raw)
To: Stephen Boyd; +Cc: linux-kernel, Michael Turquette, Scott Branden, linux-clk
Hello Stephen,
On 10/27/2015 03:51 AM, Stephen Boyd wrote:
> On 10/26, Javier Martinez Canillas wrote:
>> Commit 4a7748c3d641 ("clk: Allow drivers to build if COMPILE_TEST is
>> enabled") allowed clk drives to be compile tested on other archs but
>
> s/drives/drivers/
>
>> the COMMON_CLK_VERSATILE was only enabled on platforms that already
>> selected OF support so the drivers assume it will always be enabled.
>>
>> So, restrict compile test for these drivers only if OF is enabled.
>
> No compiler error message?
>
>>
>> Fixes: 4a7748c3d641 ("clk: Allow drivers to build if COMPILE_TEST is enabled")
>> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>>
>
> No Reported-by?
>
Yes, sorry for forgetting the Reported-by and the build error...
> I'd prefer we add stubs instead, so I've applied the patch below.
>
Great, thanks!
Best regards,
--
Javier Martinez Canillas
Open Source Group
Samsung Research America
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-10-26 22:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-25 22:41 [PATCH] clk: versatile: Make depend on OF when COMPILE_TEST Javier Martinez Canillas
2015-10-26 9:02 ` Geert Uytterhoeven
2015-10-26 14:44 ` Javier Martinez Canillas
2015-10-26 18:51 ` Stephen Boyd
2015-10-26 22:04 ` Javier Martinez Canillas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).