ARM: shmobile: r8a7740: Cleanup PM Kconfig usage
Magnus Damm
maintainerPATCH 1/1 ARM: shmobile: r8a7740: Cleanup PM Kconfig usage
From: Magnus Damm <[email protected]>
Simplify the r8a7740 PM code by using CONFIG_PM_RMOBILE instead of having a complex #if expression embedded in the C code.
---
Built on top of renesas-devel-20140904-v3.17-rc3
arch/arm/mach-shmobile/pm-r8a7740.c | 6 ++++-- arch/arm/mach-shmobile/r8a7740.h | 7 +------ 2 files changed, 5 insertions(+), 8 deletions(-)
arch/arm/mach-shmobile/pm-r8a7740.c +4 -2
@@ -13,7 +13,7 @@#include "common.h" #include "pm-rmobile.h" -#if defined(CONFIG_PM ) && !defined(CONFIG_ARCH_MULTIPLATFORM ) +#ifdef CONFIG_PM_RMOBILE static int r8a7740_pd_a4s_suspend (void ) {/*
@@ -58,7 +58,9 @@ void __init r8a7740_init_pm_domains(voidrmobile_init_domains (r8a7740_pm_domains,ARRAY_SIZE (r8a7740_pm_domains)); pm_genpd_add_subdomain_names("A4S", "A3SP"); } -#endif /* CONFIG_PM && !CONFIG_ARCH_MULTIPLATFORM */ +#else +void r8a7740_init_pm_domains (void ) {} +#endif #ifdef CONFIG_SUSPEND static int r8a7740_enter_suspend (suspend_state_t suspend_state)
arch/arm/mach-shmobile/r8a7740.h +1 -6
@@ -52,11 +52,6 @@ extern void r8a7740_add_standard_devicesextern void r8a7740_clock_init (u8 md_ck);extern void r8a7740_pinmux_init (void );extern void r8a7740_pm_init (void ); - -#if defined(CONFIG_PM ) && !defined(CONFIG_ARCH_MULTIPLATFORM ) -extern void __init r8a7740_init_pm_domains (void ); -#else -static inline void r8a7740_init_pm_domains (void ) {} -#endif /* CONFIG_PM && !CONFIG_ARCH_MULTIPLATFORM */ +extern void r8a7740_init_pm_domains (void );#endif /* __ASM_R8A7740_H__ */
Quoted 6 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Simplify the r8a7740 PM code by using
CONFIG_PM_RMOBILEinstead of having a complex #if expression embedded in the C code.Signed-off-by Magnus Damm <[email protected]>
Thanks Magnus,
this looks good to me.
The dependencies for this changes are a bit messy so I would like to defer it until v3.19. Could you repost it once v3.18-rc6 is released?
Quoted 46 lines
---
Built on top of renesas-devel-20140904-v3.17-rc3
arch/arm/mach-shmobile/pm-r8a7740.c | 6 ++++-- arch/arm/mach-shmobile/r8a7740.h | 7 +------ 2 files changed, 5 insertions(+), 8 deletions(-)arch/arm/mach-shmobile/pm-r8a7740.c +4
-2@@ -13,7 +13,7 @@#include "common.h" #include "pm-rmobile.h" -#if defined(CONFIG_PM ) && !defined(CONFIG_ARCH_MULTIPLATFORM ) +#ifdef CONFIG_PM_RMOBILE static int r8a7740_pd_a4s_suspend (void ) {/* @@ -58,7 +58,9 @@ void __init r8a7740_init_pm_domains(voidrmobile_init_domains (r8a7740_pm_domains,ARRAY_SIZE (r8a7740_pm_domains)); pm_genpd_add_subdomain_names("A4S", "A3SP"); } -#endif /* CONFIG_PM && !CONFIG_ARCH_MULTIPLATFORM */ +#else +void r8a7740_init_pm_domains (void ) {} +#endif #ifdef CONFIG_SUSPEND static int r8a7740_enter_suspend (suspend_state_t suspend_state)arch/arm/mach-shmobile/r8a7740.h +1
-6@@ -52,11 +52,6 @@ extern void r8a7740_add_standard_devicesextern void r8a7740_clock_init (u8 md_ck);extern void r8a7740_pinmux_init (void );extern void r8a7740_pm_init (void ); - -#if defined(CONFIG_PM ) && !defined(CONFIG_ARCH_MULTIPLATFORM ) -extern void __init r8a7740_init_pm_domains (void ); -#else -static inline void r8a7740_init_pm_domains (void ) {} -#endif /* CONFIG_PM && !CONFIG_ARCH_MULTIPLATFORM */ +extern void r8a7740_init_pm_domains (void );#endif /* __ASM_R8A7740_H__ */
Magnus Damm
maintainerHi Simon,
Quoted 6 lines · Simon Horman
Quoted 5 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Simplify the r8a7740 PM code by using
CONFIG_PM_RMOBILEinstead of having a complex #if expression embedded in the C code.
Quoted 8 lines
Quoted 1 line
Signed-off-by Magnus Damm <[email protected]>Thanks Magnus,
this looks good to me.
The dependencies for this changes are a bit messy so I would like to defer it until v3.19. Could you repost it once v3.18-rc6 is released?
Sure, will do! Does that apply to this patch only, or also to other things like the new (sh73a0 and/or r8a73a4) multiplatform bits and legacy board code removal?
Thanks,
/ magnus
Quoted 13 lines · Magnus Damm
Hi Simon,
Quoted 10 lines · Simon Horman
Quoted 6 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Simplify the r8a7740 PM code by using
CONFIG_PM_RMOBILEinstead of having a complex #if expression embedded in the C code.Signed-off-by Magnus Damm <[email protected]>Thanks Magnus,
Quoted 8 lines
Quoted 4 lines
this looks good to me.
The dependencies for this changes are a bit messy so I would like to defer it until v3.19. Could you repost it once v3.18-rc6 is released?
Sure, will do! Does that apply to this patch only, or also to other things like the new (sh73a0 and/or r8a73a4) multiplatform bits and legacy board code removal?
At this time I would like to handle-things on a case-by-case basis.
In general it would make my life slightly easier if all futher cleanups were deferred until v3.19. But at this stage I'm still happy to assess each patch on its merits.
Quoted 10 lines · Simon Horman
Quoted 9 lines · Magnus Damm
Hi Simon,
Quoted 6 lines · Simon Horman
Quoted 5 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Simplify the r8a7740 PM code by using
CONFIG_PM_RMOBILEinstead of having a complex #if expression embedded in the C code.
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 1 line
Signed-off-by Magnus Damm <[email protected]>Thanks Magnus,
this looks good to me.
The dependencies for this changes are a bit messy so I would like to defer it until v3.19. Could you repost it once v3.18-rc6 is released?
That should read v3.17-rc6.
Quoted 9 lines
Quoted 3 lines
Sure, will do! Does that apply to this patch only, or also to other things like the new (sh73a0 and/or r8a73a4) multiplatform bits and legacy board code removal?
At this time I would like to handle-things on a case-by-case basis.
In general it would make my life slightly easier if all futher cleanups were deferred until v3.19. But at this stage I'm still happy to assess each patch on its merits.
Hi Magnus,
Quoted 16 lines · Magnus Damm
arch/arm/mach-shmobile/pm-r8a7740.c +3
-1@@ -58,7 +58,9 @@ void __init r8a7740_init_pm_domains(voidrmobile_init_domains (r8a7740_pm_domains,ARRAY_SIZE (r8a7740_pm_domains)); pm_genpd_add_subdomain_names("A4S", "A3SP"); } -#endif /* CONFIG_PM && !CONFIG_ARCH_MULTIPLATFORM */ +#else +void r8a7740_init_pm_domains (void ) {} +#endif #ifdef CONFIG_SUSPEND static int r8a7740_enter_suspend (suspend_state_t suspend_state)arch/arm/mach-shmobile/r8a7740.h 2014-09-04 12:29:12.000000000 +0900 renamed from arch/arm/mach-shmobile/r8a7740.h +0
-0@@ -52,11 +52,6 @@ extern void r8a7740_add_standard_devices extern void r8a7740_clock_init(u8 md_ck); extern void r8a7740_pinmux_init(void);
arch/arm/mach-shmobile/r8a7740.h 2014-09-04 12:29:12.000000000 +0900 extern void r8a7740_add_standard_devices · line 57
Quoted 10 lines
arch/arm/mach-shmobile/r8a7740.h 2014-09-04 12:29:12.000000000 +0900 renamed from arch/arm/mach-shmobile/r8a7740.h +1
-6extern void r8a7740_pm_init(void); - -#if defined(CONFIG_PM) && !defined(CONFIG_ARCH_MULTIPLATFORM) -extern void __init r8a7740_init_pm_domains(void); -#else -static inline void r8a7740_init_pm_domains(void) {} -#endif /* CONFIG_PM && !CONFIG_ARCH_MULTIPLATFORM */ +extern void r8a7740_init_pm_domains(void); #endif /* __ASM_R8A7740_H__ */
Why do you make r8a7740_init_pm_domains() out-of-line in the !CONFIG_PM_RMOBILE case?
It increases code size (call to an empty function that cannot be optimized away), and prevents us from building pm-r8a7740.c conditionally on CONFIG_PM_RMOBILE and CONFIG_ARCH_R8A7740 in the future.
For the latter, we can turn pm-rmobile into a library, and do something like
pm-rmobile-objs-$(CONFIG_ARCH_R8A7740) += pm-r8a7740.o
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
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
Quoted 36 lines · Geert Uytterhoeven
Hi Magnus,
Quoted 16 lines · Magnus Damm
(quoted diff) +3
-1@@ -58,7 +58,9 @@ void __init r8a7740_init_pm_domains(void rmobile_init_domains(r8a7740_pm_domains, ARRAY_SIZE(r8a7740_pm_domains)); pm_genpd_add_subdomain_names("A4S", "A3SP"); } -#endif /* CONFIG_PM && !CONFIG_ARCH_MULTIPLATFORM */ +#else +void r8a7740_init_pm_domains(void) {} +#endif #ifdef CONFIG_SUSPEND static int r8a7740_enter_suspend(suspend_state_t suspend_state)arch/arm/mach-shmobile/r8a7740.h 2014-09-04 12:29:12.000000000 +0900 renamed from arch/arm/mach-shmobile/r8a7740.h +0
-0@@ -52,11 +52,6 @@ extern void r8a7740_add_standard_devices extern void r8a7740_clock_init(u8 md_ck); extern void r8a7740_pinmux_init(void);arch/arm/mach-shmobile/r8a7740.h 2014-09-04 12:29:12.000000000 +0900 extern void r8a7740_add_standard_devices · line 57
Quoted 10 lines
arch/arm/mach-shmobile/r8a7740.h 2014-09-04 12:29:12.000000000 +0900 renamed from arch/arm/mach-shmobile/r8a7740.h +1
-6extern void r8a7740_pm_init(void); - -#if defined(CONFIG_PM) && !defined(CONFIG_ARCH_MULTIPLATFORM) -extern void __init r8a7740_init_pm_domains(void); -#else -static inline void r8a7740_init_pm_domains(void) {} -#endif /* CONFIG_PM && !CONFIG_ARCH_MULTIPLATFORM */ +extern void r8a7740_init_pm_domains(void); #endif /* __ASM_R8A7740_H__ */Why do you make
r8a7740_init_pm_domains()out-of-line in the !CONFIG_PM_RMOBILE case?
It increases code size (call to an empty function that cannot be optimized away), and prevents us from buildingpm-r8a7740.cconditionally onCONFIG_PM_RMOBILEandCONFIG_ARCH_R8A7740in the future.
Quoted 4 lines
For the latter, we can turn pm-rmobile into a library, and do something like
pm-rmobile-objs-$(CONFIG_ARCH_R8A7740) += pm-r8a7740.o
This seems to have slipped through the cracks.
For the first part of the problem how about this update to Magnus's patch?
[PATCH v1.1] ARM: shmobile: r8a7740: Cleanup PM Kconfig usage
Simplify the r8a7740 PM code by using CONFIG_PM_RMOBILE instead of having a complex #if expression embedded in the C code.
[[email protected]: do not make r8a7740_init_pm_domains
out-of-line for !CONFIG_PM_RMOBILE case]
--- arch/arm/mach-shmobile/pm-r8a7740.c | 4 ++-- arch/arm/mach-shmobile/r8a7740.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
arch/arm/mach-shmobile/pm-r8a7740.c +2 -2
@@ -13,7 +13,7 @@#include "common.h" #include "pm-rmobile.h" -#if defined(CONFIG_PM ) && !defined(CONFIG_ARCH_MULTIPLATFORM ) +#ifdef CONFIG_PM_RMOBILE static int r8a7740_pd_a4s_suspend (void ) {/*
@@ -56,7 +56,7 @@ void __init r8a7740_init_pm_domains(void)rmobile_init_domains (r8a7740_pm_domains,ARRAY_SIZE (r8a7740_pm_domains)); pm_genpd_add_subdomain_names("A4S", "A3SP"); } -#endif /* CONFIG_PM && !CONFIG_ARCH_MULTIPLATFORM */ +#endif #ifdef CONFIG_SUSPEND static int r8a7740_enter_suspend (suspend_state_t suspend_state)
arch/arm/mach-shmobile/r8a7740.h +2 -2
@@ -53,10 +53,10 @@ extern void r8a7740_clock_init(u8 md_ck);extern void r8a7740_pinmux_init (void );extern void r8a7740_pm_init (void ); -#if defined(CONFIG_PM ) && !defined(CONFIG_ARCH_MULTIPLATFORM ) +#ifdef CONFIG_PM_RMOBILE extern void __init r8a7740_init_pm_domains (void );#else static inline void r8a7740_init_pm_domains (void ) {} -#endif /* CONFIG_PM && !CONFIG_ARCH_MULTIPLATFORM */ +#endif #endif /* __ASM_R8A7740_H__ */
Signature · 1 line
2.0.1
Quoted 37 lines · Simon Horman
Quoted 36 lines · Geert Uytterhoeven
Hi Magnus,
Quoted 16 lines · Magnus Damm
arch/arm/mach-shmobile/pm-r8a7740.c +3
-1@@ -58,7 +58,9 @@ void __init r8a7740_init_pm_domains(voidrmobile_init_domains (r8a7740_pm_domains,ARRAY_SIZE (r8a7740_pm_domains)); pm_genpd_add_subdomain_names("A4S", "A3SP"); } -#endif /* CONFIG_PM && !CONFIG_ARCH_MULTIPLATFORM */ +#else +void r8a7740_init_pm_domains (void ) {} +#endif #ifdef CONFIG_SUSPEND static int r8a7740_enter_suspend (suspend_state_t suspend_state)arch/arm/mach-shmobile/r8a7740.h 2014-09-04 12:29:12.000000000 +0900 renamed from arch/arm/mach-shmobile/r8a7740.h +0
-0@@ -52,11 +52,6 @@ extern void r8a7740_add_standard_devices extern void r8a7740_clock_init(u8 md_ck); extern void r8a7740_pinmux_init(void);arch/arm/mach-shmobile/r8a7740.h 2014-09-04 12:29:12.000000000 +0900 extern void r8a7740_add_standard_devices · line 57
Quoted 10 lines
arch/arm/mach-shmobile/r8a7740.h 2014-09-04 12:29:12.000000000 +0900 renamed from arch/arm/mach-shmobile/r8a7740.h +1
-6extern void r8a7740_pm_init(void); - -#if defined(CONFIG_PM) && !defined(CONFIG_ARCH_MULTIPLATFORM) -extern void __init r8a7740_init_pm_domains(void); -#else -static inline void r8a7740_init_pm_domains(void) {} -#endif /* CONFIG_PM && !CONFIG_ARCH_MULTIPLATFORM */ +extern void r8a7740_init_pm_domains(void); #endif /* __ASM_R8A7740_H__ */Why do you make
r8a7740_init_pm_domains()out-of-line in the !CONFIG_PM_RMOBILE case?
It increases code size (call to an empty function that cannot be optimized away), and prevents us from buildingpm-r8a7740.cconditionally onCONFIG_PM_RMOBILEandCONFIG_ARCH_R8A7740in the future.
Quoted 6 lines
Quoted 4 lines
For the latter, we can turn pm-rmobile into a library, and do something like
pm-rmobile-objs-$(CONFIG_ARCH_R8A7740) += pm-r8a7740.o
This seems to have slipped through the cracks.
Geert, are you happy with this?
Quoted 64 lines
For the first part of the problem how about this update to Magnus's patch?
[PATCH v1.1] ARM: shmobile: r8a7740: Cleanup PM
KconfigusageSimplify the r8a7740 PM code by using
CONFIG_PM_RMOBILEinstead of having a complex #if expression embedded in the C code.Signed-off-by Magnus Damm <[email protected]>[[email protected]: do not make
r8a7740_init_pm_domains
out-of-line for !CONFIG_PM_RMOBILE case]Signed-off-by Simon Horman <[email protected]>--- arch/arm/mach-shmobile/pm-r8a7740.c | 4 ++-- arch/arm/mach-shmobile/r8a7740.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)arch/arm/mach-shmobile/pm-r8a7740.c +2
-2@@ -13,7 +13,7 @@#include "common.h" #include "pm-rmobile.h" -#if defined(CONFIG_PM ) && !defined(CONFIG_ARCH_MULTIPLATFORM ) +#ifdef CONFIG_PM_RMOBILE static int r8a7740_pd_a4s_suspend (void ) {/* @@ -56,7 +56,7 @@ void __init r8a7740_init_pm_domains(void)rmobile_init_domains (r8a7740_pm_domains,ARRAY_SIZE (r8a7740_pm_domains)); pm_genpd_add_subdomain_names("A4S", "A3SP"); } -#endif /* CONFIG_PM && !CONFIG_ARCH_MULTIPLATFORM */ +#endif #ifdef CONFIG_SUSPEND static int r8a7740_enter_suspend (suspend_state_t suspend_state)arch/arm/mach-shmobile/r8a7740.h +2
-2@@ -53,10 +53,10 @@ extern void r8a7740_clock_init(u8 md_ck);extern void r8a7740_pinmux_init (void );extern void r8a7740_pm_init (void ); -#if defined(CONFIG_PM ) && !defined(CONFIG_ARCH_MULTIPLATFORM ) +#ifdef CONFIG_PM_RMOBILE extern void __init r8a7740_init_pm_domains (void );#else static inline void r8a7740_init_pm_domains (void ) {} -#endif /* CONFIG_PM && !CONFIG_ARCH_MULTIPLATFORM */ +#endif #endif /* __ASM_R8A7740_H__ */ Signature · 7 lines
2.0.1 -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Simon, Magnus,
Quoted 36 lines · Simon Horman
Quoted 35 lines · Simon Horman
Quoted 34 lines · Geert Uytterhoeven
Quoted 16 lines · Magnus Damm
arch/arm/mach-shmobile/pm-r8a7740.c +3
-1@@ -58,7 +58,9 @@ void __init r8a7740_init_pm_domains(voidrmobile_init_domains (r8a7740_pm_domains,ARRAY_SIZE (r8a7740_pm_domains)); pm_genpd_add_subdomain_names("A4S", "A3SP"); } -#endif /* CONFIG_PM && !CONFIG_ARCH_MULTIPLATFORM */ +#else +void r8a7740_init_pm_domains (void ) {} +#endif #ifdef CONFIG_SUSPEND static int r8a7740_enter_suspend (suspend_state_t suspend_state)arch/arm/mach-shmobile/r8a7740.h 2014-09-04 12:29:12.000000000 +0900 renamed from arch/arm/mach-shmobile/r8a7740.h +0
-0@@ -52,11 +52,6 @@ extern void r8a7740_add_standard_devices extern void r8a7740_clock_init(u8 md_ck); extern void r8a7740_pinmux_init(void);arch/arm/mach-shmobile/r8a7740.h 2014-09-04 12:29:12.000000000 +0900 extern void r8a7740_add_standard_devices · line 57
Quoted 10 lines
arch/arm/mach-shmobile/r8a7740.h 2014-09-04 12:29:12.000000000 +0900 renamed from arch/arm/mach-shmobile/r8a7740.h +1
-6extern void r8a7740_pm_init(void); - -#if defined(CONFIG_PM) && !defined(CONFIG_ARCH_MULTIPLATFORM) -extern void __init r8a7740_init_pm_domains(void); -#else -static inline void r8a7740_init_pm_domains(void) {} -#endif /* CONFIG_PM && !CONFIG_ARCH_MULTIPLATFORM */ +extern void r8a7740_init_pm_domains(void); #endif /* __ASM_R8A7740_H__ */Why do you make
r8a7740_init_pm_domains()out-of-line in the !CONFIG_PM_RMOBILE case?
It increases code size (call to an empty function that cannot be optimized away), and prevents us from buildingpm-r8a7740.cconditionally onCONFIG_PM_RMOBILEandCONFIG_ARCH_R8A7740in the future.
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
For the latter, we can turn pm-rmobile into a library, and do something like
pm-rmobile-objs-$(CONFIG_ARCH_R8A7740) += pm-r8a7740.o
This seems to have slipped through the cracks.
Geert, are you happy with this?
I'd like to ask to drop this patch, as I'll have to revert this hunk in pm-r8a7740.c:
-#if defined(CONFIG_PM) && !defined(CONFIG_ARCH_MULTIPLATFORM)
+#ifdef CONFIG_PM_RMOBILEto add DT PM domain support.
Is that OK for you?
BTW, changing
-#if defined(CONFIG_PM) && !defined(CONFIG_ARCH_MULTIPLATFORM)
+#if defined(CONFIG_PM_RMOBILE) && !defined(CONFIG_ARCH_MULTIPLATFORM)is fine for me, though, but I don't know it's worth the effort.
Quoted 54 lines
Quoted 54 lines
For the first part of the problem how about this update to Magnus's patch?
[PATCH v1.1] ARM: shmobile: r8a7740: Cleanup PM
KconfigusageSimplify the r8a7740 PM code by using
CONFIG_PM_RMOBILEinstead of having a complex #if expression embedded in the C code.Signed-off-by Magnus Damm <[email protected]>[[email protected]: do not make
r8a7740_init_pm_domains
out-of-line for !CONFIG_PM_RMOBILE case]Signed-off-by Simon Horman <[email protected]>--- arch/arm/mach-shmobile/pm-r8a7740.c | 4 ++-- arch/arm/mach-shmobile/r8a7740.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)arch/arm/mach-shmobile/pm-r8a7740.c +2
-2@@ -13,7 +13,7 @@#include "common.h" #include "pm-rmobile.h" -#if defined(CONFIG_PM ) && !defined(CONFIG_ARCH_MULTIPLATFORM ) +#ifdef CONFIG_PM_RMOBILE static int r8a7740_pd_a4s_suspend (void ) {/* @@ -56,7 +56,7 @@ void __init r8a7740_init_pm_domains(void)rmobile_init_domains (r8a7740_pm_domains,ARRAY_SIZE (r8a7740_pm_domains)); pm_genpd_add_subdomain_names("A4S", "A3SP"); } -#endif /* CONFIG_PM && !CONFIG_ARCH_MULTIPLATFORM */ +#endif #ifdef CONFIG_SUSPEND static int r8a7740_enter_suspend (suspend_state_t suspend_state)arch/arm/mach-shmobile/r8a7740.h +2
-2@@ -53,10 +53,10 @@ extern void r8a7740_clock_init(u8 md_ck);extern void r8a7740_pinmux_init (void );extern void r8a7740_pm_init (void ); -#if defined(CONFIG_PM ) && !defined(CONFIG_ARCH_MULTIPLATFORM ) +#ifdef CONFIG_PM_RMOBILE extern void __init r8a7740_init_pm_domains (void );#else static inline void r8a7740_init_pm_domains (void ) {} -#endif /* CONFIG_PM && !CONFIG_ARCH_MULTIPLATFORM */ +#endif
Quoted 3 lines
Quoted 3 lines
arch/arm/mach-shmobile/r8a7740.h +0
-1#endif /* __ASM_R8A7740_H__ */ --2.0.1
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
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
Quoted 51 lines · Geert Uytterhoeven
Hi Simon, Magnus,
Quoted 36 lines · Simon Horman
Quoted 35 lines · Simon Horman
Quoted 34 lines · Geert Uytterhoeven
Quoted 16 lines · Magnus Damm
arch/arm/mach-shmobile/pm-r8a7740.c +3
-1@@ -58,7 +58,9 @@ void __init r8a7740_init_pm_domains(voidrmobile_init_domains (r8a7740_pm_domains,ARRAY_SIZE (r8a7740_pm_domains)); pm_genpd_add_subdomain_names("A4S", "A3SP"); } -#endif /* CONFIG_PM && !CONFIG_ARCH_MULTIPLATFORM */ +#else +void r8a7740_init_pm_domains (void ) {} +#endif #ifdef CONFIG_SUSPEND static int r8a7740_enter_suspend (suspend_state_t suspend_state)arch/arm/mach-shmobile/r8a7740.h 2014-09-04 12:29:12.000000000 +0900 renamed from arch/arm/mach-shmobile/r8a7740.h +0
-0@@ -52,11 +52,6 @@ extern void r8a7740_add_standard_devices extern void r8a7740_clock_init(u8 md_ck); extern void r8a7740_pinmux_init(void);arch/arm/mach-shmobile/r8a7740.h 2014-09-04 12:29:12.000000000 +0900 extern void r8a7740_add_standard_devices · line 57
Quoted 10 lines
arch/arm/mach-shmobile/r8a7740.h 2014-09-04 12:29:12.000000000 +0900 renamed from arch/arm/mach-shmobile/r8a7740.h +1
-6extern void r8a7740_pm_init(void); - -#if defined(CONFIG_PM) && !defined(CONFIG_ARCH_MULTIPLATFORM) -extern void __init r8a7740_init_pm_domains(void); -#else -static inline void r8a7740_init_pm_domains(void) {} -#endif /* CONFIG_PM && !CONFIG_ARCH_MULTIPLATFORM */ +extern void r8a7740_init_pm_domains(void); #endif /* __ASM_R8A7740_H__ */Why do you make
r8a7740_init_pm_domains()out-of-line in the !CONFIG_PM_RMOBILE case?
It increases code size (call to an empty function that cannot be optimized away), and prevents us from buildingpm-r8a7740.cconditionally onCONFIG_PM_RMOBILEandCONFIG_ARCH_R8A7740in the future.Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
For the latter, we can turn pm-rmobile into a library, and do something like
pm-rmobile-objs-$(CONFIG_ARCH_R8A7740) += pm-r8a7740.o
This seems to have slipped through the cracks.
Geert, are you happy with this?
I'd like to ask to drop this patch, as I'll have to revert this hunk in
pm-r8a7740.c:
Quoted 6 lines
-#if defined(CONFIG_PM) && !defined(CONFIG_ARCH_MULTIPLATFORM) +#ifdef CONFIG_PM_RMOBILEto add DT PM domain support.
Is that OK for you?
Yes, that is fine. I'll mark it as rejected.
Quoted 6 lines
BTW, changing
-#if defined(CONFIG_PM) && !defined(CONFIG_ARCH_MULTIPLATFORM) +#if defined(CONFIG_PM_RMOBILE) && !defined(CONFIG_ARCH_MULTIPLATFORM)is fine for me, though, but I don't know it's worth the effort.
I don't think it is worth the noise it creates.
Quoted 74 lines
Quoted 55 lines
Quoted 55 lines
For the first part of the problem how about this update to Magnus's patch?
[PATCH v1.1] ARM: shmobile: r8a7740: Cleanup PM
KconfigusageSimplify the r8a7740 PM code by using
CONFIG_PM_RMOBILEinstead of having a complex #if expression embedded in the C code.Signed-off-by Magnus Damm <[email protected]>[[email protected]: do not make
r8a7740_init_pm_domains
out-of-line for !CONFIG_PM_RMOBILE case]Signed-off-by Simon Horman <[email protected]>--- arch/arm/mach-shmobile/pm-r8a7740.c | 4 ++-- arch/arm/mach-shmobile/r8a7740.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)arch/arm/mach-shmobile/pm-r8a7740.c +2
-2@@ -13,7 +13,7 @@#include "common.h" #include "pm-rmobile.h" -#if defined(CONFIG_PM ) && !defined(CONFIG_ARCH_MULTIPLATFORM ) +#ifdef CONFIG_PM_RMOBILE static int r8a7740_pd_a4s_suspend (void ) {/* @@ -56,7 +56,7 @@ void __init r8a7740_init_pm_domains(void)rmobile_init_domains (r8a7740_pm_domains,ARRAY_SIZE (r8a7740_pm_domains)); pm_genpd_add_subdomain_names("A4S", "A3SP"); } -#endif /* CONFIG_PM && !CONFIG_ARCH_MULTIPLATFORM */ +#endif #ifdef CONFIG_SUSPEND static int r8a7740_enter_suspend (suspend_state_t suspend_state)arch/arm/mach-shmobile/r8a7740.h +2
-2@@ -53,10 +53,10 @@ extern void r8a7740_clock_init(u8 md_ck);extern void r8a7740_pinmux_init (void );extern void r8a7740_pm_init (void ); -#if defined(CONFIG_PM ) && !defined(CONFIG_ARCH_MULTIPLATFORM ) +#ifdef CONFIG_PM_RMOBILE extern void __init r8a7740_init_pm_domains (void );#else static inline void r8a7740_init_pm_domains (void ) {} -#endif /* CONFIG_PM && !CONFIG_ARCH_MULTIPLATFORM */ +#endif Quoted 3 lines
Quoted 3 lines
arch/arm/mach-shmobile/r8a7740.h +0
-1#endif /* __ASM_R8A7740_H__ */ --2.0.1
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]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
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html