* [PATCH] clocksource: mips-gic-timer: make gic_clocksource_of_init return int
@ 2016-08-01 3:35 Paul Gortmaker
2016-08-02 12:09 ` Daniel Lezcano
2016-08-16 13:57 ` Daniel Lezcano
0 siblings, 2 replies; 3+ messages in thread
From: Paul Gortmaker @ 2016-08-01 3:35 UTC (permalink / raw)
To: linux-kernel; +Cc: Paul Gortmaker, Daniel Lezcano, linux-mips
In commit d8152bf85d2c057fc39c3e20a4d623f524d9f09c:
("clocksource/drivers/mips-gic-timer: Convert init function to return error")
several return values were added to a void function resulting in:
clocksource/mips-gic-timer.c: In function 'gic_clocksource_of_init':
clocksource/mips-gic-timer.c:175:3: warning: 'return' with a value, in function returning void [enabled by default]
clocksource/mips-gic-timer.c:183:4: warning: 'return' with a value, in function returning void [enabled by default]
clocksource/mips-gic-timer.c:190:3: warning: 'return' with a value, in function returning void [enabled by default]
clocksource/mips-gic-timer.c:195:3: warning: 'return' with a value, in function returning void [enabled by default]
clocksource/mips-gic-timer.c:200:3: warning: 'return' with a value, in function returning void [enabled by default]
clocksource/mips-gic-timer.c:211:2: warning: 'return' with a value, in function returning void [enabled by default]
clocksource/mips-gic-timer.c: At top level:
clocksource/mips-gic-timer.c:213:1: warning: comparison of distinct pointer types lacks a cast [enabled by default]
clocksource/mips-gic-timer.c: In function 'gic_clocksource_of_init':
clocksource/mips-gic-timer.c:183:18: warning: ignoring return value of 'PTR_ERR', declared with attribute warn_unused_result [-Wunused-result]
Given that the addition of the return values was intentional, it seems
that the conversion of the containing function from void to int was
simply overlooked.
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: linux-mips@linux-mips.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
drivers/clocksource/mips-gic-timer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clocksource/mips-gic-timer.c b/drivers/clocksource/mips-gic-timer.c
index d91e8725917c..b4b3ab5a11ad 100644
--- a/drivers/clocksource/mips-gic-timer.c
+++ b/drivers/clocksource/mips-gic-timer.c
@@ -164,7 +164,7 @@ void __init gic_clocksource_init(unsigned int frequency)
gic_start_count();
}
-static void __init gic_clocksource_of_init(struct device_node *node)
+static int __init gic_clocksource_of_init(struct device_node *node)
{
struct clk *clk;
int ret;
--
2.8.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] clocksource: mips-gic-timer: make gic_clocksource_of_init return int
2016-08-01 3:35 [PATCH] clocksource: mips-gic-timer: make gic_clocksource_of_init return int Paul Gortmaker
@ 2016-08-02 12:09 ` Daniel Lezcano
2016-08-16 13:57 ` Daniel Lezcano
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Lezcano @ 2016-08-02 12:09 UTC (permalink / raw)
To: Paul Gortmaker, linux-kernel, Thomas Gleixner; +Cc: linux-mips
On 08/01/2016 05:35 AM, Paul Gortmaker wrote:
> In commit d8152bf85d2c057fc39c3e20a4d623f524d9f09c:
> ("clocksource/drivers/mips-gic-timer: Convert init function to return error")
>
> several return values were added to a void function resulting in:
>
> clocksource/mips-gic-timer.c: In function 'gic_clocksource_of_init':
> clocksource/mips-gic-timer.c:175:3: warning: 'return' with a value, in function returning void [enabled by default]
> clocksource/mips-gic-timer.c:183:4: warning: 'return' with a value, in function returning void [enabled by default]
> clocksource/mips-gic-timer.c:190:3: warning: 'return' with a value, in function returning void [enabled by default]
> clocksource/mips-gic-timer.c:195:3: warning: 'return' with a value, in function returning void [enabled by default]
> clocksource/mips-gic-timer.c:200:3: warning: 'return' with a value, in function returning void [enabled by default]
> clocksource/mips-gic-timer.c:211:2: warning: 'return' with a value, in function returning void [enabled by default]
> clocksource/mips-gic-timer.c: At top level:
> clocksource/mips-gic-timer.c:213:1: warning: comparison of distinct pointer types lacks a cast [enabled by default]
> clocksource/mips-gic-timer.c: In function 'gic_clocksource_of_init':
> clocksource/mips-gic-timer.c:183:18: warning: ignoring return value of 'PTR_ERR', declared with attribute warn_unused_result [-Wunused-result]
>
> Given that the addition of the return values was intentional, it seems
> that the conversion of the containing function from void to int was
> simply overlooked.
>
> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> Cc: linux-mips@linux-mips.org
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Thomas,
can you merge this patch in tip/timers/urgent ?
Thanks !
-- Daniel
> ---
> drivers/clocksource/mips-gic-timer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/clocksource/mips-gic-timer.c b/drivers/clocksource/mips-gic-timer.c
> index d91e8725917c..b4b3ab5a11ad 100644
> --- a/drivers/clocksource/mips-gic-timer.c
> +++ b/drivers/clocksource/mips-gic-timer.c
> @@ -164,7 +164,7 @@ void __init gic_clocksource_init(unsigned int frequency)
> gic_start_count();
> }
>
> -static void __init gic_clocksource_of_init(struct device_node *node)
> +static int __init gic_clocksource_of_init(struct device_node *node)
> {
> struct clk *clk;
> int ret;
>
--
<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] 3+ messages in thread
* Re: [PATCH] clocksource: mips-gic-timer: make gic_clocksource_of_init return int
2016-08-01 3:35 [PATCH] clocksource: mips-gic-timer: make gic_clocksource_of_init return int Paul Gortmaker
2016-08-02 12:09 ` Daniel Lezcano
@ 2016-08-16 13:57 ` Daniel Lezcano
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Lezcano @ 2016-08-16 13:57 UTC (permalink / raw)
To: Paul Gortmaker, linux-kernel; +Cc: linux-mips
On 08/01/2016 05:35 AM, Paul Gortmaker wrote:
> In commit d8152bf85d2c057fc39c3e20a4d623f524d9f09c:
> ("clocksource/drivers/mips-gic-timer: Convert init function to return error")
>
> several return values were added to a void function resulting in:
>
> clocksource/mips-gic-timer.c: In function 'gic_clocksource_of_init':
> clocksource/mips-gic-timer.c:175:3: warning: 'return' with a value, in function returning void [enabled by default]
> clocksource/mips-gic-timer.c:183:4: warning: 'return' with a value, in function returning void [enabled by default]
> clocksource/mips-gic-timer.c:190:3: warning: 'return' with a value, in function returning void [enabled by default]
> clocksource/mips-gic-timer.c:195:3: warning: 'return' with a value, in function returning void [enabled by default]
> clocksource/mips-gic-timer.c:200:3: warning: 'return' with a value, in function returning void [enabled by default]
> clocksource/mips-gic-timer.c:211:2: warning: 'return' with a value, in function returning void [enabled by default]
> clocksource/mips-gic-timer.c: At top level:
> clocksource/mips-gic-timer.c:213:1: warning: comparison of distinct pointer types lacks a cast [enabled by default]
> clocksource/mips-gic-timer.c: In function 'gic_clocksource_of_init':
> clocksource/mips-gic-timer.c:183:18: warning: ignoring return value of 'PTR_ERR', declared with attribute warn_unused_result [-Wunused-result]
>
> Given that the addition of the return values was intentional, it seems
> that the conversion of the containing function from void to int was
> simply overlooked.
>
> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> Cc: linux-mips@linux-mips.org
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> ---
Hi Paul,
Thomas is in vacation and I'm returning back.
So I applied this patch as a fix.
Thanks!
-- Daniel
--
<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] 3+ messages in thread
end of thread, other threads:[~2016-08-16 13:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-01 3:35 [PATCH] clocksource: mips-gic-timer: make gic_clocksource_of_init return int Paul Gortmaker
2016-08-02 12:09 ` Daniel Lezcano
2016-08-16 13:57 ` Daniel Lezcano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox