The helper functions that access the opaque struct clk should
not be marked inline since they are contained in clk.c, but expected
to be used by other compilation units. This causes compile errors
under gcc-4.7
In file included from arch/arm/mach-omap2/clockdomain.c:25:0:
arch/arm/mach-omap2/clockdomain.c: In function ?clkdm_clk_disable?:
include/linux/clk-provider.h:338:12: error: inlining failed in call to always_inline ?__clk_get_enable_count?: function body not available
arch/arm/mach-omap2/clockdomain.c:1001:28: error: called from here
make[1]: *** [arch/arm/mach-omap2/clockdomain.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2
Signed-off-by: Russ Dill <redacted>
---
drivers/clk/clk.c | 14 +++++++-------
include/linux/clk-provider.h | 4 ++--
2 files changed, 9 insertions(+), 9 deletions(-)
From: Mike Turquette <hidden> Date: 2012-11-26 19:57:59
Quoting Russ Dill (2012-11-26 11:20:09)
The helper functions that access the opaque struct clk should
not be marked inline since they are contained in clk.c, but expected
to be used by other compilation units. This causes compile errors
under gcc-4.7
In file included from arch/arm/mach-omap2/clockdomain.c:25:0:
arch/arm/mach-omap2/clockdomain.c: In function ?clkdm_clk_disable?:
include/linux/clk-provider.h:338:12: error: inlining failed in call to always_inline ?__clk_get_enable_count?: function body not available
arch/arm/mach-omap2/clockdomain.c:1001:28: error: called from here
make[1]: *** [arch/arm/mach-omap2/clockdomain.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2
Hi Russ,
A fix for this was merged into rc7. See 93532c8a, "clk: remove inline
usage from clk-provider.h".
Regardless, I'm still considering this patch. I've heard many times
that we should trust the compiler to optimize for us and some folks look
down on inlining in general. If anyone has an opinion on removing
inlines from the common clk core then please do speak up.
Russ, can you update to the latest rc and verify if that fix is enough
for you?
Regards,
Mike
From: "Mark A. Greer" <mgreer@animalcreek.com> Date: 2012-11-26 21:07:23
On Mon, Nov 26, 2012 at 11:57:42AM -0800, Mike Turquette wrote:
Quoting Russ Dill (2012-11-26 11:20:09)
quoted
The helper functions that access the opaque struct clk should
not be marked inline since they are contained in clk.c, but expected
to be used by other compilation units. This causes compile errors
under gcc-4.7
In file included from arch/arm/mach-omap2/clockdomain.c:25:0:
arch/arm/mach-omap2/clockdomain.c: In function ?clkdm_clk_disable?:
include/linux/clk-provider.h:338:12: error: inlining failed in call to always_inline ?__clk_get_enable_count?: function body not available
arch/arm/mach-omap2/clockdomain.c:1001:28: error: called from here
make[1]: *** [arch/arm/mach-omap2/clockdomain.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2
Hi Mike.
Regardless, I'm still considering this patch. I've heard many times
that we should trust the compiler to optimize for us and some folks look
down on inlining in general. If anyone has an opinion on removing
inlines from the common clk core then please do speak up.
You should take a look at "Chapter 15: The inline disease" in
Documentation/CodingStyle.
Mark
--
On Mon, Nov 26, 2012 at 11:57 AM, Mike Turquette [off-list ref] wrote:
Quoting Russ Dill (2012-11-26 11:20:09)
quoted
The helper functions that access the opaque struct clk should
not be marked inline since they are contained in clk.c, but expected
to be used by other compilation units. This causes compile errors
under gcc-4.7
In file included from arch/arm/mach-omap2/clockdomain.c:25:0:
arch/arm/mach-omap2/clockdomain.c: In function ?clkdm_clk_disable?:
include/linux/clk-provider.h:338:12: error: inlining failed in call to always_inline ?__clk_get_enable_count?: function body not available
arch/arm/mach-omap2/clockdomain.c:1001:28: error: called from here
make[1]: *** [arch/arm/mach-omap2/clockdomain.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2
Hi Russ,
A fix for this was merged into rc7. See 93532c8a, "clk: remove inline
usage from clk-provider.h".
Regardless, I'm still considering this patch. I've heard many times
that we should trust the compiler to optimize for us and some folks look
down on inlining in general. If anyone has an opinion on removing
inlines from the common clk core then please do speak up.
Russ, can you update to the latest rc and verify if that fix is enough
for you?
Yes, that commit fixes the compile issue too. I'd go with the more
complete removal of inlines though. If you have a declaration in a
header, it makes no sense to call it inline in the .c
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Mike Turquette <hidden> Date: 2013-01-12 00:38:06
Quoting Russ Dill (2012-11-27 09:52:50)
On Mon, Nov 26, 2012 at 11:57 AM, Mike Turquette [off-list ref] wrote:
quoted
Quoting Russ Dill (2012-11-26 11:20:09)
quoted
The helper functions that access the opaque struct clk should
not be marked inline since they are contained in clk.c, but expected
to be used by other compilation units. This causes compile errors
under gcc-4.7
In file included from arch/arm/mach-omap2/clockdomain.c:25:0:
arch/arm/mach-omap2/clockdomain.c: In function ?clkdm_clk_disable?:
include/linux/clk-provider.h:338:12: error: inlining failed in call to always_inline ?__clk_get_enable_count?: function body not available
arch/arm/mach-omap2/clockdomain.c:1001:28: error: called from here
make[1]: *** [arch/arm/mach-omap2/clockdomain.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2
Hi Russ,
A fix for this was merged into rc7. See 93532c8a, "clk: remove inline
usage from clk-provider.h".
Regardless, I'm still considering this patch. I've heard many times
that we should trust the compiler to optimize for us and some folks look
down on inlining in general. If anyone has an opinion on removing
inlines from the common clk core then please do speak up.
Russ, can you update to the latest rc and verify if that fix is enough
for you?
Yes, that commit fixes the compile issue too. I'd go with the more
complete removal of inlines though. If you have a declaration in a
header, it makes no sense to call it inline in the .c
Hi Russ,
I've taken this into clk-next.
Thanks,
Mike
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html