All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] soc: tegra: fix tegra_pmc_get_suspend_mode definition
@ 2020-04-08 19:01 ` Arnd Bergmann
  0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2020-04-08 19:01 UTC (permalink / raw)
  To: soc-DgEjT+Ai2ygdnm+yROfE0A, Thierry Reding, Jonathan Hunter,
	Dmitry Osipenko, Daniel Lezcano, Peter De Schrijver
  Cc: Arnd Bergmann, Thierry Reding, Venkat Reddy Talla,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

When CONFIG_PM_SLEEP is disabled, the function is not defined,
causing a link failure:

arm-linux-gnueabi-ld: drivers/cpuidle/cpuidle-tegra.o: in function `tegra_cpuidle_probe':
cpuidle-tegra.c:(.text+0x24): undefined reference to `tegra_pmc_get_suspend_mode'

Change the #ifdef check according to the definition.

Fixes: 382ac8e22b90 ("cpuidle: tegra: Disable CC6 state if LP2 unavailable")
Signed-off-by: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
---
 include/soc/tegra/pmc.h | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/include/soc/tegra/pmc.h b/include/soc/tegra/pmc.h
index 0dd52b0a5c1b..361cb64246f7 100644
--- a/include/soc/tegra/pmc.h
+++ b/include/soc/tegra/pmc.h
@@ -168,7 +168,6 @@ int tegra_io_pad_power_disable(enum tegra_io_pad id);
 int tegra_io_rail_power_on(unsigned int id);
 int tegra_io_rail_power_off(unsigned int id);
 
-enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void);
 void tegra_pmc_set_suspend_mode(enum tegra_suspend_mode mode);
 void tegra_pmc_enter_suspend_mode(enum tegra_suspend_mode mode);
 
@@ -220,11 +219,6 @@ static inline int tegra_io_rail_power_off(unsigned int id)
 	return -ENOSYS;
 }
 
-static inline enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void)
-{
-	return TEGRA_SUSPEND_NONE;
-}
-
 static inline void tegra_pmc_set_suspend_mode(enum tegra_suspend_mode mode)
 {
 }
@@ -235,4 +229,13 @@ static inline void tegra_pmc_enter_suspend_mode(enum tegra_suspend_mode mode)
 
 #endif /* CONFIG_SOC_TEGRA_PMC */
 
+#if defined(CONFIG_SOC_TEGRA_PMC) && defined(CONFIG_PM_SLEEP)
+enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void);
+#else
+static inline enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void)
+{
+	return TEGRA_SUSPEND_NONE;
+}
+#endif
+
 #endif /* __SOC_TEGRA_PMC_H__ */
-- 
2.26.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] soc: tegra: fix tegra_pmc_get_suspend_mode definition
@ 2020-04-08 19:01 ` Arnd Bergmann
  0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2020-04-08 19:01 UTC (permalink / raw)
  To: soc, Thierry Reding, Jonathan Hunter, Dmitry Osipenko,
	Daniel Lezcano, Peter De Schrijver
  Cc: Arnd Bergmann, Thierry Reding, Venkat Reddy Talla, linux-tegra,
	linux-kernel

When CONFIG_PM_SLEEP is disabled, the function is not defined,
causing a link failure:

arm-linux-gnueabi-ld: drivers/cpuidle/cpuidle-tegra.o: in function `tegra_cpuidle_probe':
cpuidle-tegra.c:(.text+0x24): undefined reference to `tegra_pmc_get_suspend_mode'

Change the #ifdef check according to the definition.

Fixes: 382ac8e22b90 ("cpuidle: tegra: Disable CC6 state if LP2 unavailable")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 include/soc/tegra/pmc.h | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/include/soc/tegra/pmc.h b/include/soc/tegra/pmc.h
index 0dd52b0a5c1b..361cb64246f7 100644
--- a/include/soc/tegra/pmc.h
+++ b/include/soc/tegra/pmc.h
@@ -168,7 +168,6 @@ int tegra_io_pad_power_disable(enum tegra_io_pad id);
 int tegra_io_rail_power_on(unsigned int id);
 int tegra_io_rail_power_off(unsigned int id);
 
-enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void);
 void tegra_pmc_set_suspend_mode(enum tegra_suspend_mode mode);
 void tegra_pmc_enter_suspend_mode(enum tegra_suspend_mode mode);
 
@@ -220,11 +219,6 @@ static inline int tegra_io_rail_power_off(unsigned int id)
 	return -ENOSYS;
 }
 
-static inline enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void)
-{
-	return TEGRA_SUSPEND_NONE;
-}
-
 static inline void tegra_pmc_set_suspend_mode(enum tegra_suspend_mode mode)
 {
 }
@@ -235,4 +229,13 @@ static inline void tegra_pmc_enter_suspend_mode(enum tegra_suspend_mode mode)
 
 #endif /* CONFIG_SOC_TEGRA_PMC */
 
+#if defined(CONFIG_SOC_TEGRA_PMC) && defined(CONFIG_PM_SLEEP)
+enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void);
+#else
+static inline enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void)
+{
+	return TEGRA_SUSPEND_NONE;
+}
+#endif
+
 #endif /* __SOC_TEGRA_PMC_H__ */
-- 
2.26.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] soc: tegra: fix tegra_pmc_get_suspend_mode definition
  2020-04-08 19:01 ` Arnd Bergmann
@ 2020-04-08 20:56     ` Dmitry Osipenko
  -1 siblings, 0 replies; 6+ messages in thread
From: Dmitry Osipenko @ 2020-04-08 20:56 UTC (permalink / raw)
  To: Arnd Bergmann, soc-DgEjT+Ai2ygdnm+yROfE0A, Thierry Reding,
	Jonathan Hunter, Daniel Lezcano, Peter De Schrijver
  Cc: Thierry Reding, Venkat Reddy Talla,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

08.04.2020 22:01, Arnd Bergmann пишет:
> When CONFIG_PM_SLEEP is disabled, the function is not defined,
> causing a link failure:
> 
> arm-linux-gnueabi-ld: drivers/cpuidle/cpuidle-tegra.o: in function `tegra_cpuidle_probe':
> cpuidle-tegra.c:(.text+0x24): undefined reference to `tegra_pmc_get_suspend_mode'
> 
> Change the #ifdef check according to the definition.
> 
> Fixes: 382ac8e22b90 ("cpuidle: tegra: Disable CC6 state if LP2 unavailable")
> Signed-off-by: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
> ---

Reviewed-by: Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] soc: tegra: fix tegra_pmc_get_suspend_mode definition
@ 2020-04-08 20:56     ` Dmitry Osipenko
  0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Osipenko @ 2020-04-08 20:56 UTC (permalink / raw)
  To: Arnd Bergmann, soc, Thierry Reding, Jonathan Hunter,
	Daniel Lezcano, Peter De Schrijver
  Cc: Thierry Reding, Venkat Reddy Talla, linux-tegra, linux-kernel

08.04.2020 22:01, Arnd Bergmann пишет:
> When CONFIG_PM_SLEEP is disabled, the function is not defined,
> causing a link failure:
> 
> arm-linux-gnueabi-ld: drivers/cpuidle/cpuidle-tegra.o: in function `tegra_cpuidle_probe':
> cpuidle-tegra.c:(.text+0x24): undefined reference to `tegra_pmc_get_suspend_mode'
> 
> Change the #ifdef check according to the definition.
> 
> Fixes: 382ac8e22b90 ("cpuidle: tegra: Disable CC6 state if LP2 unavailable")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---

Reviewed-by: Dmitry Osipenko <digetx@gmail.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] soc: tegra: fix tegra_pmc_get_suspend_mode definition
  2020-04-08 19:01 ` Arnd Bergmann
@ 2020-04-09 15:02     ` Thierry Reding
  -1 siblings, 0 replies; 6+ messages in thread
From: Thierry Reding @ 2020-04-09 15:02 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: soc-DgEjT+Ai2ygdnm+yROfE0A, Thierry Reding, Jonathan Hunter,
	Dmitry Osipenko, Daniel Lezcano, Peter De Schrijver,
	Venkat Reddy Talla, linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 832 bytes --]

On Wed, Apr 08, 2020 at 09:01:15PM +0200, Arnd Bergmann wrote:
> When CONFIG_PM_SLEEP is disabled, the function is not defined,
> causing a link failure:
> 
> arm-linux-gnueabi-ld: drivers/cpuidle/cpuidle-tegra.o: in function `tegra_cpuidle_probe':
> cpuidle-tegra.c:(.text+0x24): undefined reference to `tegra_pmc_get_suspend_mode'
> 
> Change the #ifdef check according to the definition.
> 
> Fixes: 382ac8e22b90 ("cpuidle: tegra: Disable CC6 state if LP2 unavailable")
> Signed-off-by: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
> ---
>  include/soc/tegra/pmc.h | 15 +++++++++------
>  1 file changed, 9 insertions(+), 6 deletions(-)

Acked-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

Let me know if you'd prefer me to send this in a pull request later on.

Thanks,
Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] soc: tegra: fix tegra_pmc_get_suspend_mode definition
@ 2020-04-09 15:02     ` Thierry Reding
  0 siblings, 0 replies; 6+ messages in thread
From: Thierry Reding @ 2020-04-09 15:02 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: soc, Thierry Reding, Jonathan Hunter, Dmitry Osipenko,
	Daniel Lezcano, Peter De Schrijver, Venkat Reddy Talla,
	linux-tegra, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 783 bytes --]

On Wed, Apr 08, 2020 at 09:01:15PM +0200, Arnd Bergmann wrote:
> When CONFIG_PM_SLEEP is disabled, the function is not defined,
> causing a link failure:
> 
> arm-linux-gnueabi-ld: drivers/cpuidle/cpuidle-tegra.o: in function `tegra_cpuidle_probe':
> cpuidle-tegra.c:(.text+0x24): undefined reference to `tegra_pmc_get_suspend_mode'
> 
> Change the #ifdef check according to the definition.
> 
> Fixes: 382ac8e22b90 ("cpuidle: tegra: Disable CC6 state if LP2 unavailable")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  include/soc/tegra/pmc.h | 15 +++++++++------
>  1 file changed, 9 insertions(+), 6 deletions(-)

Acked-by: Thierry Reding <treding@nvidia.com>

Let me know if you'd prefer me to send this in a pull request later on.

Thanks,
Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-04-09 15:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-08 19:01 [PATCH] soc: tegra: fix tegra_pmc_get_suspend_mode definition Arnd Bergmann
2020-04-08 19:01 ` Arnd Bergmann
     [not found] ` <20200408190127.587768-1-arnd-r2nGTMty4D4@public.gmane.org>
2020-04-08 20:56   ` Dmitry Osipenko
2020-04-08 20:56     ` Dmitry Osipenko
2020-04-09 15:02   ` Thierry Reding
2020-04-09 15:02     ` Thierry Reding

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.