|
Revision tags: v6.15, v6.15-rc7, v6.15-rc6, v6.15-rc5, v6.15-rc4, v6.15-rc3, v6.15-rc2, v6.15-rc1, v6.14, v6.14-rc7, v6.14-rc6, v6.14-rc5, v6.14-rc4, v6.14-rc3, v6.14-rc2, v6.14-rc1, v6.13, v6.13-rc7, v6.13-rc6, v6.13-rc5, v6.13-rc4, v6.13-rc3, v6.13-rc2, v6.13-rc1, v6.12, v6.12-rc7, v6.12-rc6, v6.12-rc5, v6.12-rc4, v6.12-rc3, v6.12-rc2, v6.12-rc1, v6.11, v6.11-rc7, v6.11-rc6, v6.11-rc5 |
|
| #
471ef0b5 |
| 19-Aug-2024 |
Daniel Lezcano <[email protected]> |
clocksource/drivers/timer-of: Remove percpu irq related code
GCC's named address space checks errors out with:
drivers/clocksource/timer-of.c: In function ‘timer_of_irq_exit’: drivers/clocksource/t
clocksource/drivers/timer-of: Remove percpu irq related code
GCC's named address space checks errors out with:
drivers/clocksource/timer-of.c: In function ‘timer_of_irq_exit’: drivers/clocksource/timer-of.c:29:46: error: passing argument 2 of ‘free_percpu_irq’ from pointer to non-enclosed address space 29 | free_percpu_irq(of_irq->irq, clkevt); | ^~~~~~ In file included from drivers/clocksource/timer-of.c:8: ./include/linux/interrupt.h:201:43: note: expected ‘__seg_gs void *’ but argument is of type ‘struct clock_event_device *’ 201 | extern void free_percpu_irq(unsigned int, void __percpu *); | ^~~~~~~~~~~~~~~ drivers/clocksource/timer-of.c: In function ‘timer_of_irq_init’: drivers/clocksource/timer-of.c:74:51: error: passing argument 4 of ‘request_percpu_irq’ from pointer to non-enclosed address space 74 | np->full_name, clkevt) : | ^~~~~~ ./include/linux/interrupt.h:190:56: note: expected ‘__seg_gs void *’ but argument is of type ‘struct clock_event_device *’ 190 | const char *devname, void __percpu *percpu_dev_id)
Sparse warns about:
timer-of.c:29:46: warning: incorrect type in argument 2 (different address spaces) timer-of.c:29:46: expected void [noderef] __percpu * timer-of.c:29:46: got struct clock_event_device *clkevt timer-of.c:74:51: warning: incorrect type in argument 4 (different address spaces) timer-of.c:74:51: expected void [noderef] __percpu *percpu_dev_id timer-of.c:74:51: got struct clock_event_device *clkevt
It appears the code is incorrect as reported by Uros Bizjak:
"The referred code is questionable as it tries to reuse the clkevent pointer once as percpu pointer and once as generic pointer, which should be avoided."
This change removes the percpu related code as no drivers is using it.
[Daniel: Fixed the description]
Fixes: dc11bae785295 ("clocksource/drivers: Add timer-of common init routine") Reported-by: Uros Bizjak <[email protected]> Tested-by: Uros Bizjak <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Lezcano <[email protected]>
show more ...
|
|
Revision tags: v6.11-rc4, v6.11-rc3, v6.11-rc2, v6.11-rc1, v6.10, v6.10-rc7, v6.10-rc6, v6.10-rc5, v6.10-rc4, v6.10-rc3, v6.10-rc2, v6.10-rc1, v6.9, v6.9-rc7, v6.9-rc6, v6.9-rc5, v6.9-rc4, v6.9-rc3, v6.9-rc2, v6.9-rc1, v6.8, v6.8-rc7, v6.8-rc6, v6.8-rc5, v6.8-rc4, v6.8-rc3, v6.8-rc2, v6.8-rc1, v6.7, v6.7-rc8, v6.7-rc7, v6.7-rc6, v6.7-rc5, v6.7-rc4, v6.7-rc3, v6.7-rc2, v6.7-rc1, v6.6, v6.6-rc7, v6.6-rc6, v6.6-rc5, v6.6-rc4, v6.6-rc3, v6.6-rc2, v6.6-rc1, v6.5, v6.5-rc7, v6.5-rc6, v6.5-rc5, v6.5-rc4, v6.5-rc3, v6.5-rc2, v6.5-rc1, v6.4, v6.4-rc7, v6.4-rc6, v6.4-rc5, v6.4-rc4, v6.4-rc3, v6.4-rc2, v6.4-rc1, v6.3, v6.3-rc7, v6.3-rc6, v6.3-rc5, v6.3-rc4, v6.3-rc3, v6.3-rc2, v6.3-rc1, v6.2, v6.2-rc8, v6.2-rc7, v6.2-rc6, v6.2-rc5, v6.2-rc4, v6.2-rc3, v6.2-rc2, v6.2-rc1, v6.1, v6.1-rc8, v6.1-rc7, v6.1-rc6, v6.1-rc5, v6.1-rc4, v6.1-rc3, v6.1-rc2, v6.1-rc1, v6.0, v6.0-rc7, v6.0-rc6, v6.0-rc5, v6.0-rc4, v6.0-rc3, v6.0-rc2, v6.0-rc1, v5.19, v5.19-rc8, v5.19-rc7, v5.19-rc6, v5.19-rc5, v5.19-rc4, v5.19-rc3, v5.19-rc2, v5.19-rc1, v5.18, v5.18-rc7, v5.18-rc6, v5.18-rc5, v5.18-rc4, v5.18-rc3, v5.18-rc2, v5.18-rc1, v5.17, v5.17-rc8 |
|
| #
4467b8ba |
| 07-Mar-2022 |
Guillaume Ranquet <[email protected]> |
clocksource/drivers/timer-of: Check return value of of_iomap in timer_of_base_init()
of_base->base can either be iomapped using of_io_request_and_map() or of_iomap() depending whether or not an of_b
clocksource/drivers/timer-of: Check return value of of_iomap in timer_of_base_init()
of_base->base can either be iomapped using of_io_request_and_map() or of_iomap() depending whether or not an of_base->name has been set.
Thus check of_base->base against NULL as of_iomap() does not return a PTR_ERR() in case of error.
Fixes: 9aea417afa6b ("clocksource/drivers/timer-of: Don't request the resource by name") Signed-off-by: Guillaume Ranquet <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Lezcano <[email protected]>
show more ...
|
|
Revision tags: v5.17-rc7, v5.17-rc6, v5.17-rc5, v5.17-rc4, v5.17-rc3, v5.17-rc2, v5.17-rc1, v5.16, v5.16-rc8, v5.16-rc7, v5.16-rc6, v5.16-rc5, v5.16-rc4, v5.16-rc3, v5.16-rc2, v5.16-rc1, v5.15, v5.15-rc7, v5.15-rc6, v5.15-rc5, v5.15-rc4, v5.15-rc3, v5.15-rc2, v5.15-rc1, v5.14, v5.14-rc7, v5.14-rc6, v5.14-rc5, v5.14-rc4, v5.14-rc3, v5.14-rc2, v5.14-rc1, v5.13, v5.13-rc7, v5.13-rc6, v5.13-rc5, v5.13-rc4, v5.13-rc3, v5.13-rc2, v5.13-rc1, v5.12, v5.12-rc8, v5.12-rc7, v5.12-rc6, v5.12-rc5 |
|
| #
4bf07f65 |
| 22-Mar-2021 |
Ingo Molnar <[email protected]> |
timekeeping, clocksource: Fix various typos in comments
Fix ~56 single-word typos in timekeeping & clocksource code comments.
Signed-off-by: Ingo Molnar <[email protected]> Cc: Thomas Gleixner <tglx
timekeeping, clocksource: Fix various typos in comments
Fix ~56 single-word typos in timekeeping & clocksource code comments.
Signed-off-by: Ingo Molnar <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: John Stultz <[email protected]> Cc: Stephen Boyd <[email protected]> Cc: Daniel Lezcano <[email protected]> Cc: [email protected]
show more ...
|
|
Revision tags: v5.12-rc4, v5.12-rc3, v5.12-rc2, v5.12-rc1, v5.12-rc1-dontuse, v5.11, v5.11-rc7, v5.11-rc6, v5.11-rc5, v5.11-rc4, v5.11-rc3, v5.11-rc2, v5.11-rc1, v5.10, v5.10-rc7, v5.10-rc6, v5.10-rc5, v5.10-rc4, v5.10-rc3, v5.10-rc2, v5.10-rc1, v5.9, v5.9-rc8, v5.9-rc7, v5.9-rc6, v5.9-rc5, v5.9-rc4, v5.9-rc3, v5.9-rc2, v5.9-rc1, v5.8, v5.8-rc7, v5.8-rc6, v5.8-rc5, v5.8-rc4, v5.8-rc3, v5.8-rc2, v5.8-rc1, v5.7, v5.7-rc7, v5.7-rc6, v5.7-rc5, v5.7-rc4, v5.7-rc3, v5.7-rc2, v5.7-rc1, v5.6, v5.6-rc7, v5.6-rc6, v5.6-rc5, v5.6-rc4, v5.6-rc3, v5.6-rc2, v5.6-rc1, v5.5, v5.5-rc7, v5.5-rc6, v5.5-rc5, v5.5-rc4, v5.5-rc3, v5.5-rc2, v5.5-rc1, v5.4, v5.4-rc8, v5.4-rc7, v5.4-rc6, v5.4-rc5, v5.4-rc4 |
|
| #
4411464d |
| 16-Oct-2019 |
Geert Uytterhoeven <[email protected]> |
clocksource/drivers/timer-of: Use unique device name instead of timer
If a hardware-specific driver does not provide a name, the timer-of core falls back to device_node.name. Due to generic DT node
clocksource/drivers/timer-of: Use unique device name instead of timer
If a hardware-specific driver does not provide a name, the timer-of core falls back to device_node.name. Due to generic DT node naming policies, that name is almost always "timer", and thus doesn't identify the actual timer used.
Fix this by using device_node.full_name instead, which includes the unit addrees.
Example impact on /proc/timer_list:
-Clock Event Device: timer +Clock Event Device: timer@fcfec400
Signed-off-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Link: https://lore.kernel.org/r/[email protected]
show more ...
|
| #
ccb80012 |
| 16-Oct-2019 |
Geert Uytterhoeven <[email protected]> |
clocksource/drivers/timer-of: Convert last full_name to %pOF
Commit 469869d18a886e04 ("clocksource: Convert to using %pOF instead of full_name") converted all but the one just added before by commit
clocksource/drivers/timer-of: Convert last full_name to %pOF
Commit 469869d18a886e04 ("clocksource: Convert to using %pOF instead of full_name") converted all but the one just added before by commit 32f2fea6e77e64cd ("clocksource/drivers/timer-of: Handle of_irq_get_byname() result correctly").
Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Link: https://lore.kernel.org/r/[email protected]
show more ...
|
|
Revision tags: v5.4-rc3, v5.4-rc2 |
|
| #
0f1a7b3f |
| 02-Oct-2019 |
Linus Torvalds <[email protected]> |
timer-of: don't use conditional expression with mixed 'void' types
Randy Dunlap reports on the sparse list that sparse warns about this expression:
of_irq->percpu ? free_percpu_irq(of_irq->
timer-of: don't use conditional expression with mixed 'void' types
Randy Dunlap reports on the sparse list that sparse warns about this expression:
of_irq->percpu ? free_percpu_irq(of_irq->irq, clkevt) : free_irq(of_irq->irq, clkevt);
and honestly, sparse is correct to warn. The return type of free_percpu_irq() is 'void', while free_irq() returns a 'const void *' that is the devname argument passed in to the request_irq().
You can't mix a void type with a non-void types in a conditional expression according to the C standard. It so happens that gcc seems to accept it - and the resulting type of the expression is void - but there's really no reason for the kernel to have this kind of non-standard expression with no real upside.
The natural way to write that expression is with an if-statement:
if (of_irq->percpu) free_percpu_irq(of_irq->irq, clkevt); else free_irq(of_irq->irq, clkevt);
which is more legible anyway.
I'm not sure why that timer-of code seems to have this odd pattern. It does the same at allocation time, but at least there the types match, and it makes sense as an expression.
Reported-by: Randy Dunlap <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
show more ...
|
|
Revision tags: v5.4-rc1, v5.3, v5.3-rc8, v5.3-rc7, v5.3-rc6 |
|
| #
76371977 |
| 21-Aug-2019 |
Jon Hunter <[email protected]> |
clocksource/drivers/timer-of: Do not warn on deferred probe
Deferred probe is an expected return value for clk_get() on many platforms. The driver deals with it properly, so there's no need to outpu
clocksource/drivers/timer-of: Do not warn on deferred probe
Deferred probe is an expected return value for clk_get() on many platforms. The driver deals with it properly, so there's no need to output a warning that may potentially confuse users.
Signed-off-by: Jon Hunter <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
show more ...
|
|
Revision tags: v5.3-rc5, v5.3-rc4, v5.3-rc3, v5.3-rc2, v5.3-rc1, v5.2, v5.2-rc7, v5.2-rc6, v5.2-rc5, v5.2-rc4, v5.2-rc3 |
|
| #
9952f691 |
| 28-May-2019 |
Thomas Gleixner <[email protected]> |
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 201
Based on 1 normalized pattern(s):
this program is free software you can redistribute it and or modify it under the terms and c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 201
Based on 1 normalized pattern(s):
this program is free software you can redistribute it and or modify it under the terms and conditions of the gnu general public license version 2 as published by the free software foundation this program is distributed in the hope it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not see http www gnu org licenses
extracted by the scancode license scanner the SPDX license identifier
GPL-2.0-only
has been chosen to replace the boilerplate/reference in 228 file(s).
Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Allison Randal <[email protected]> Reviewed-by: Steve Winslow <[email protected]> Reviewed-by: Richard Fontana <[email protected]> Reviewed-by: Alexios Zavras <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
|
Revision tags: v5.2-rc2, v5.2-rc1, v5.1, v5.1-rc7, v5.1-rc6, v5.1-rc5, v5.1-rc4, v5.1-rc3, v5.1-rc2, v5.1-rc1, v5.0, v5.0-rc8, v5.0-rc7, v5.0-rc6, v5.0-rc5, v5.0-rc4, v5.0-rc3, v5.0-rc2, v5.0-rc1, v4.20, v4.20-rc7, v4.20-rc6, v4.20-rc5, v4.20-rc4, v4.20-rc3, v4.20-rc2, v4.20-rc1, v4.19, v4.19-rc8, v4.19-rc7, v4.19-rc6, v4.19-rc5, v4.19-rc4, v4.19-rc3, v4.19-rc2, v4.19-rc1, v4.18, v4.18-rc8, v4.18-rc7, v4.18-rc6, v4.18-rc5, v4.18-rc4, v4.18-rc3, v4.18-rc2, v4.18-rc1, v4.17, v4.17-rc7, v4.17-rc6, v4.17-rc5, v4.17-rc4, v4.17-rc3, v4.17-rc2, v4.17-rc1, v4.16, v4.16-rc7, v4.16-rc6, v4.16-rc5, v4.16-rc4, v4.16-rc3, v4.16-rc2, v4.16-rc1, v4.15, v4.15-rc9, v4.15-rc8 |
|
| #
9aea417a |
| 08-Jan-2018 |
Daniel Lezcano <[email protected]> |
clocksource/drivers/timer-of: Don't request the resource by name
When the driver does not specify a name for the resource, don't use of_io_request_and_map() but of_iomap(). That prevents resource na
clocksource/drivers/timer-of: Don't request the resource by name
When the driver does not specify a name for the resource, don't use of_io_request_and_map() but of_iomap(). That prevents resource name allocation conflicts on some platforms which have the same name as the node.
Tested-by: Benjamin Gaignard <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Acked-by: Benjamin Gaignard <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
show more ...
|
| #
1c63c1c0 |
| 08-Jan-2018 |
Daniel Lezcano <[email protected]> |
clocksource/drivers/timer-of: Store the device node pointer in 'struct timer_of'
Under certain circumstances, some specific operations must be done with the device node pointer, which forces the tim
clocksource/drivers/timer-of: Store the device node pointer in 'struct timer_of'
Under certain circumstances, some specific operations must be done with the device node pointer, which forces the timer code to propagate the pointer to the functions which need it.
In order to consolidate the function signatures in the different drivers by using the timer-of structure, let's store it in the timer-of structure as a handy pointer when it is needed.
Tested-by: Benjamin Gaignard <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Acked-by: Benjamin Gaignard <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
show more ...
|
| #
cf7f46b9 |
| 08-Jan-2018 |
Daniel Lezcano <[email protected]> |
clocksource/drivers/timer-of: Add kernel documentation
The current code has no comments, neither any function descriptions. Fix this by adding function descriptions in kernel doc format.
Signed-off
clocksource/drivers/timer-of: Add kernel documentation
The current code has no comments, neither any function descriptions. Fix this by adding function descriptions in kernel doc format.
Signed-off-by: Daniel Lezcano <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/[email protected] [ Spelling and style fixes. ] Signed-off-by: Ingo Molnar <[email protected]>
show more ...
|
| #
5bbf4ad9 |
| 08-Jan-2018 |
Daniel Lezcano <[email protected]> |
clocksource/drivers/timer-of: Fix function names
All the functions are not prefixed with 'timer_of_', fix the naming in order to have the code consistent.
Signed-off-by: Daniel Lezcano <daniel.lezc
clocksource/drivers/timer-of: Fix function names
All the functions are not prefixed with 'timer_of_', fix the naming in order to have the code consistent.
Signed-off-by: Daniel Lezcano <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
show more ...
|
|
Revision tags: v4.15-rc7, v4.15-rc6, v4.15-rc5, v4.15-rc4, v4.15-rc3, v4.15-rc2, v4.15-rc1 |
|
| #
558de282 |
| 14-Nov-2017 |
Benjamin Gaignard <[email protected]> |
clocksource/timer_of: Rename timer_of_exit to timer_of_cleanup
Change the function name to something more explicit since it is only used in init error cases.
Add __init annotation and description a
clocksource/timer_of: Rename timer_of_exit to timer_of_cleanup
Change the function name to something more explicit since it is only used in init error cases.
Add __init annotation and description about the function usage.
Signed-off-by: Benjamin Gaignard <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected]
show more ...
|
|
Revision tags: v4.14, v4.14-rc8, v4.14-rc7, v4.14-rc6 |
|
| #
f48729a9 |
| 23-Oct-2017 |
Benjamin Gaignard <[email protected]> |
clocksource/drivers/timer-of: Add timer_of_exit function
The timer-of API does not provide a function to undo what has been done by the timer_of_init() function.
Add a timer_of_exit() function.
Si
clocksource/drivers/timer-of: Add timer_of_exit function
The timer-of API does not provide a function to undo what has been done by the timer_of_init() function.
Add a timer_of_exit() function.
Signed-off-by: Benjamin Gaignard <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
show more ...
|
|
Revision tags: v4.14-rc5, v4.14-rc4, v4.14-rc3, v4.14-rc2, v4.14-rc1, v4.13, v4.13-rc7, v4.13-rc6, v4.13-rc5, v4.13-rc4, v4.13-rc3, v4.13-rc2 |
|
| #
469869d1 |
| 18-Jul-2017 |
Rob Herring <[email protected]> |
clocksource: Convert to using %pOF instead of full_name
Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of th
clocksource: Convert to using %pOF instead of full_name
Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node.
Signed-off-by: Rob Herring <[email protected]> Cc: Daniel Lezcano <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Marc Gonzalez <[email protected]> Cc: Maxime Coquelin <[email protected]> Cc: Alexandre Torgue <[email protected]> Cc: [email protected] Acked-by: Marc Gonzalez <[email protected]> Acked-by: Alexandre TORGUE <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
show more ...
|
|
Revision tags: v4.13-rc1 |
|
| #
9e80dbd8 |
| 10-Jul-2017 |
Dan Carpenter <[email protected]> |
clocksource/drivers/timer-of: Checking for IS_ERR() instead of NULL
The current code checks the return value of the of_io_request_and_map() function as it was returning a NULL pointer in case of err
clocksource/drivers/timer-of: Checking for IS_ERR() instead of NULL
The current code checks the return value of the of_io_request_and_map() function as it was returning a NULL pointer in case of error.
However, it returns an error code encoded in the pointer return value, not a NULL value. Fix this by checking the returned pointer against IS_ERR() and return the error with PTR_ERR().
Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
show more ...
|
| #
32f2fea6 |
| 17-Jul-2017 |
Sergei Shtylyov <[email protected]> |
clocksource/drivers/timer-of: Handle of_irq_get_byname() result correctly
of_irq_get_byname() may return a negative error number as well as 0 on failure, while timer_irq_init() only checks for 0, bl
clocksource/drivers/timer-of: Handle of_irq_get_byname() result correctly
of_irq_get_byname() may return a negative error number as well as 0 on failure, while timer_irq_init() only checks for 0, blithely continuing with the call to request_[percpu_]irq() -- those functions expect *unsigned int*, so would probably fail anyway when a large IRQ number resulting from a conversion of a negative error number is passed to them... This, however, is incorrect behavior -- error number is not IRQ number.
Filter out the negative error numbers, complain, and return them to the timer_irq_init()'s callers...
Fixes: dc11bae78529 ("clocksource/drivers: Add timer-of common init routine") Signed-off-by: Sergei Shtylyov <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Cc: Daniel Lezcano <[email protected]> Link: http://lkml.kernel.org/r/[email protected]
show more ...
|
|
Revision tags: v4.12, v4.12-rc7 |
|
| #
22ece4e3 |
| 20-Jun-2017 |
Daniel Lezcano <[email protected]> |
clocksource/drivers/timer-of: Fix invalid iomap check
A typo in the code checks the return value of iomap against !NULL and, thus, fails everytime the mapping succeed.
Fix this by inverting the con
clocksource/drivers/timer-of: Fix invalid iomap check
A typo in the code checks the return value of iomap against !NULL and, thus, fails everytime the mapping succeed.
Fix this by inverting the condition in the check.
Signed-off-by: Daniel Lezcano <[email protected]>
show more ...
|
| #
b7dcc4ea |
| 21-Jun-2017 |
Arnd Bergmann <[email protected]> |
clocksource/drivers: Fix uninitialized variable use in timer_of_init
If none of the flags are set, 'ret' is uninitialized as pointed out by gcc:
drivers/clocksource/timer-of.c: In function 'timer_o
clocksource/drivers: Fix uninitialized variable use in timer_of_init
If none of the flags are set, 'ret' is uninitialized as pointed out by gcc:
drivers/clocksource/timer-of.c: In function 'timer_of_init': drivers/clocksource/timer-of.c:160:9: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized]
Since calling the function without any of the flags is an error, set the return value to -EINVAL for that case.
[ tglx: Get rid of the silly backwards goto while at it ]
Fixes: dc11bae78529 ("clocksource/drivers: Add timer-of common init routine") Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Cc: Daniel Lezcano <[email protected]> Link: http://lkml.kernel.org/r/[email protected]
show more ...
|
|
Revision tags: v4.12-rc6, v4.12-rc5, v4.12-rc4 |
|
| #
dc11bae7 |
| 04-Jun-2017 |
Daniel Lezcano <[email protected]> |
clocksource/drivers: Add timer-of common init routine
The different drivers are all using the same pattern when initializing.
1. Get the base address 2. Get the irq number 3. Get the clock 4. P
clocksource/drivers: Add timer-of common init routine
The different drivers are all using the same pattern when initializing.
1. Get the base address 2. Get the irq number 3. Get the clock 4. Prepare and enable the clock 5. Get the rate 6. Request an interrupt
Instead of repeating again and again these steps in all the drivers, let's provide a common init routine to give the opportunity to factor all of them out.
We can expect a significant kernel size improvement when the common routine will be used in all the drivers.
Signed-off-by: Daniel Lezcano <[email protected]>
show more ...
|