* [PATCH] clocksource/drivers/exynos_mct: explicitly return 0 for shared timer
@ 2023-04-03 9:40 ` Krzysztof Kozlowski
2023-04-03 12:59 ` Vincent Whitchurch
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-03 9:40 UTC (permalink / raw)
To: Daniel Lezcano, Thomas Gleixner, Krzysztof Kozlowski,
Alim Akhtar, linux-kernel, linux-arm-kernel, linux-samsung-soc
Cc: Vincent Whitchurch, kernel test robot, Dan Carpenter
For a shared timers, the mct_init_dt() should not initialize the clock
even with global comparator. This is not an error, thus the function
should simply return 0, not 'ret'.
This also fixes smatch warning:
drivers/clocksource/exynos_mct.c:635 mct_init_dt() warn: missing error code? 'ret'
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Link: https://lore.kernel.org/r/202304021446.46XVKag0-lkp@intel.com/
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/clocksource/exynos_mct.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
index bfd60093ee1c..ef8cb1b71be4 100644
--- a/drivers/clocksource/exynos_mct.c
+++ b/drivers/clocksource/exynos_mct.c
@@ -677,17 +677,17 @@ static int __init mct_init_dt(struct device_node *np, unsigned int int_type)
if (ret)
return ret;
/*
* When the FRC is shared with a main processor, this secondary
* processor cannot use the global comparator.
*/
if (frc_shared)
- return ret;
+ return 0;
return exynos4_clockevent_init();
}
static int __init mct_init_spi(struct device_node *np)
{
return mct_init_dt(np, MCT_INT_SPI);
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] clocksource/drivers/exynos_mct: explicitly return 0 for shared timer
2023-04-03 9:40 ` [PATCH] clocksource/drivers/exynos_mct: explicitly return 0 for shared timer Krzysztof Kozlowski
@ 2023-04-03 12:59 ` Vincent Whitchurch
2023-04-03 16:49 ` Alim Akhtar
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Vincent Whitchurch @ 2023-04-03 12:59 UTC (permalink / raw)
To: tglx, linux-arm-kernel, linux-kernel, daniel.lezcano,
krzysztof.kozlowski, linux-samsung-soc, alim.akhtar
Cc: Vincent Whitchurch, lkp, error27
On Mon, 2023-04-03 at 11:40 +0200, Krzysztof Kozlowski wrote:
> For a shared timers, the mct_init_dt() should not initialize the clock
> even with global comparator. This is not an error, thus the function
> should simply return 0, not 'ret'.
>
> This also fixes smatch warning:
>
> drivers/clocksource/exynos_mct.c:635 mct_init_dt() warn: missing error code? 'ret'
>
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <error27@gmail.com>
> Link: https://lore.kernel.org/r/202304021446.46XVKag0-lkp@intel.com/
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] clocksource/drivers/exynos_mct: explicitly return 0 for shared timer
2023-04-03 9:40 ` [PATCH] clocksource/drivers/exynos_mct: explicitly return 0 for shared timer Krzysztof Kozlowski
2023-04-03 12:59 ` Vincent Whitchurch
@ 2023-04-03 16:49 ` Alim Akhtar
2023-04-06 13:37 ` Daniel Lezcano
2023-04-26 9:12 ` [tip: timers/core] clocksource/drivers/exynos_mct: Explicitly " tip-bot2 for Krzysztof Kozlowski
3 siblings, 0 replies; 5+ messages in thread
From: Alim Akhtar @ 2023-04-03 16:49 UTC (permalink / raw)
To: 'Krzysztof Kozlowski', 'Daniel Lezcano',
'Thomas Gleixner',
linux-kernel, linux-arm-kernel, linux-samsung-soc
Cc: 'Vincent Whitchurch', 'kernel test robot',
'Dan Carpenter'
Hello Krzysztof
> -----Original Message-----
> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Sent: Monday, April 3, 2023 3:10 PM
> To: Daniel Lezcano <daniel.lezcano@linaro.org>; Thomas Gleixner
> <tglx@linutronix.de>; Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org>;
> Alim Akhtar <alim.akhtar@samsung.com>; linux-kernel@vger.kernel.org;
> linux-arm-kernel@lists.infradead.org; linux-samsung-soc@vger.kernel.org
> Cc: Vincent Whitchurch <vincent.whitchurch@axis.com>; kernel test robot
> <lkp@intel.com>; Dan Carpenter <error27@gmail.com>
> Subject: [PATCH] clocksource/drivers/exynos_mct: explicitly return 0 for
> shared timer
>
> For a shared timers, the mct_init_dt() should not initialize the clock
even with
> global comparator. This is not an error, thus the function should simply
> return 0, not 'ret'.
>
> This also fixes smatch warning:
>
> drivers/clocksource/exynos_mct.c:635 mct_init_dt() warn: missing error
> code? 'ret'
>
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <error27@gmail.com>
> Link: https://lore.kernel.org/r/202304021446.46XVKag0-lkp@intel.com/
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
> drivers/clocksource/exynos_mct.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/clocksource/exynos_mct.c
> b/drivers/clocksource/exynos_mct.c
> index bfd60093ee1c..ef8cb1b71be4 100644
> --- a/drivers/clocksource/exynos_mct.c
> +++ b/drivers/clocksource/exynos_mct.c
> @@ -677,17 +677,17 @@ static int __init mct_init_dt(struct device_node
> *np, unsigned int int_type)
> if (ret)
> return ret;
>
> /*
> * When the FRC is shared with a main processor, this secondary
> * processor cannot use the global comparator.
> */
> if (frc_shared)
> - return ret;
> + return 0;
>
> return exynos4_clockevent_init();
> }
>
>
> static int __init mct_init_spi(struct device_node *np) {
> return mct_init_dt(np, MCT_INT_SPI);
> --
> 2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] clocksource/drivers/exynos_mct: explicitly return 0 for shared timer
2023-04-03 9:40 ` [PATCH] clocksource/drivers/exynos_mct: explicitly return 0 for shared timer Krzysztof Kozlowski
2023-04-03 12:59 ` Vincent Whitchurch
2023-04-03 16:49 ` Alim Akhtar
@ 2023-04-06 13:37 ` Daniel Lezcano
2023-04-26 9:12 ` [tip: timers/core] clocksource/drivers/exynos_mct: Explicitly " tip-bot2 for Krzysztof Kozlowski
3 siblings, 0 replies; 5+ messages in thread
From: Daniel Lezcano @ 2023-04-06 13:37 UTC (permalink / raw)
To: Krzysztof Kozlowski, Thomas Gleixner, Alim Akhtar, linux-kernel,
linux-arm-kernel, linux-samsung-soc
Cc: Vincent Whitchurch, kernel test robot, Dan Carpenter
On 03/04/2023 11:40, Krzysztof Kozlowski wrote:
> For a shared timers, the mct_init_dt() should not initialize the clock
> even with global comparator. This is not an error, thus the function
> should simply return 0, not 'ret'.
>
> This also fixes smatch warning:
>
> drivers/clocksource/exynos_mct.c:635 mct_init_dt() warn: missing error code? 'ret'
>
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <error27@gmail.com>
> Link: https://lore.kernel.org/r/202304021446.46XVKag0-lkp@intel.com/
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
Applied, thanks
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 5+ messages in thread
* [tip: timers/core] clocksource/drivers/exynos_mct: Explicitly return 0 for shared timer
2023-04-03 9:40 ` [PATCH] clocksource/drivers/exynos_mct: explicitly return 0 for shared timer Krzysztof Kozlowski
` (2 preceding siblings ...)
2023-04-06 13:37 ` Daniel Lezcano
@ 2023-04-26 9:12 ` tip-bot2 for Krzysztof Kozlowski
3 siblings, 0 replies; 5+ messages in thread
From: tip-bot2 for Krzysztof Kozlowski @ 2023-04-26 9:12 UTC (permalink / raw)
To: linux-tip-commits
Cc: kernel test robot, Dan Carpenter, Krzysztof Kozlowski,
Vincent Whitchurch, Alim Akhtar, Daniel Lezcano, x86,
linux-kernel
The following commit has been merged into the timers/core branch of tip:
Commit-ID: fd3f088f35f610a7ee3045b7d172b362342e43c6
Gitweb: https://git.kernel.org/tip/fd3f088f35f610a7ee3045b7d172b362342e43c6
Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
AuthorDate: Mon, 03 Apr 2023 11:40:17 +02:00
Committer: Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Mon, 24 Apr 2023 16:56:13 +02:00
clocksource/drivers/exynos_mct: Explicitly return 0 for shared timer
For a shared timers, the mct_init_dt() should not initialize the clock
even with global comparator. This is not an error, thus the function
should simply return 0, not 'ret'.
This also fixes smatch warning:
drivers/clocksource/exynos_mct.c:635 mct_init_dt() warn: missing error code? 'ret'
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Link: https://lore.kernel.org/r/202304021446.46XVKag0-lkp@intel.com/
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20230403094017.9556-1-krzysztof.kozlowski@linaro.org
---
drivers/clocksource/exynos_mct.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
index bfd6009..ef8cb1b 100644
--- a/drivers/clocksource/exynos_mct.c
+++ b/drivers/clocksource/exynos_mct.c
@@ -682,7 +682,7 @@ static int __init mct_init_dt(struct device_node *np, unsigned int int_type)
* processor cannot use the global comparator.
*/
if (frc_shared)
- return ret;
+ return 0;
return exynos4_clockevent_init();
}
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-04-26 9:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20230403094023epcas5p3cb0690c9984ce4d80ede8483a312be4d@epcas5p3.samsung.com>
2023-04-03 9:40 ` [PATCH] clocksource/drivers/exynos_mct: explicitly return 0 for shared timer Krzysztof Kozlowski
2023-04-03 12:59 ` Vincent Whitchurch
2023-04-03 16:49 ` Alim Akhtar
2023-04-06 13:37 ` Daniel Lezcano
2023-04-26 9:12 ` [tip: timers/core] clocksource/drivers/exynos_mct: Explicitly " tip-bot2 for Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®