The timer related functions do not have a strict timer_ prefixed namespace which is really annoying. Rename del_timer() to timer_delete() and provide del_timer() as a wrapper. Document that del_timer() is not for new code.
Showing the changes to kernel/time/timer.c (1 of 2 files). Show all
Unified · Split
| @@ -1257,7 +1257,7 @@ void add_timer_on(struct timer_list *timer, int cpu) · 1256 unmodified lines | |||
| 1257 | EXPORT_SYMBOL_GPL(add_timer_on); | 1257 | EXPORT_SYMBOL_GPL(add_timer_on); |
| 1258 | 1258 | ||
| 1259 | /** | 1259 | /** |
| 1260 | * del_timer - Deactivate a timer. | 1260 | * timer_delete - Deactivate a timer |
| 1261 | * @timer: The timer to be deactivated | 1261 | * @timer: The timer to be deactivated |
| 1262 | * | 1262 | * |
| 1263 | * The function only deactivates a pending timer, but contrary to | 1263 | * The function only deactivates a pending timer, but contrary to |
| @@ -1270,7 +1270,7 @@ EXPORT_SYMBOL_GPL(add_timer_on); · 6 unmodified lines | |||
| 1270 | * * %0 - The timer was not pending | 1270 | * * %0 - The timer was not pending |
| 1271 | * * %1 - The timer was pending and deactivated | 1271 | * * %1 - The timer was pending and deactivated |
| 1272 | */ | 1272 | */ |
| 1273 | int del_timer(struct timer_list *timer) | 1273 | int timer_delete(struct timer_list *timer) |
| 1274 | { | 1274 | { |
| 1275 | struct timer_base *base; | 1275 | struct timer_base *base; |
| 1276 | unsigned long flags; | 1276 | unsigned long flags; |
| @@ -1286,7 +1286,7 @@ int del_timer(struct timer_list *timer) · 9 unmodified lines | |||
| 1286 | 1286 | ||
| 1287 | return ret; | 1287 | return ret; |
| 1288 | } | 1288 | } |
| 1289 | EXPORT_SYMBOL(del_timer); | 1289 | EXPORT_SYMBOL(timer_delete); |
| 1290 | 1290 | ||
| 1291 | /** | 1291 | /** |
| 1292 | * try_to_del_timer_sync - Try to deactivate a timer | 1292 | * try_to_del_timer_sync - Try to deactivate a timer |