Revert "Reapply "timers: Rename del_timer_sync() to timer_delete_sync()""

This reverts commit ec8a8e23a19bbd6dbaa158c16a60560aec48b95f.

The merge conflicts are now over, so bring it back as the abi can not be
broken.

Bug: 161946584
Change-Id: I16533658044de8e0d862cc282e528ad30fd540da
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman
2024-07-22 12:36:15 +00:00
parent 2587385ace
commit e757b335e0
3 changed files with 11 additions and 24 deletions

View File

@@ -791,7 +791,7 @@ s32 brcmf_notify_escan_complete(struct brcmf_cfg80211_info *cfg,
scan_request = cfg->scan_request; scan_request = cfg->scan_request;
cfg->scan_request = NULL; cfg->scan_request = NULL;
timer_delete_sync(&cfg->escan_timeout); del_timer_sync(&cfg->escan_timeout);
if (fw_abort) { if (fw_abort) {
/* Do a scan abort to stop the driver's scan engine */ /* Do a scan abort to stop the driver's scan engine */

View File

@@ -187,20 +187,7 @@ extern int timer_reduce(struct timer_list *timer, unsigned long expires);
extern void add_timer(struct timer_list *timer); extern void add_timer(struct timer_list *timer);
extern int try_to_del_timer_sync(struct timer_list *timer); extern int try_to_del_timer_sync(struct timer_list *timer);
extern int timer_delete_sync(struct timer_list *timer); extern int del_timer_sync(struct timer_list *timer);
/**
* del_timer_sync - Delete a pending timer and wait for a running callback
* @timer: The timer to be deleted
*
* See timer_delete_sync() for detailed explanation.
*
* Do not use in new code. Use timer_delete_sync() instead.
*/
static inline int del_timer_sync(struct timer_list *timer)
{
return timer_delete_sync(timer);
}
extern void init_timers(void); extern void init_timers(void);
struct hrtimer; struct hrtimer;

View File

@@ -1089,7 +1089,7 @@ __mod_timer(struct timer_list *timer, unsigned long expires, unsigned int option
/* /*
* We are trying to schedule the timer on the new base. * We are trying to schedule the timer on the new base.
* However we can't change timer's base while it is running, * However we can't change timer's base while it is running,
* otherwise timer_delete_sync() can't detect that the timer's * otherwise del_timer_sync() can't detect that the timer's
* handler yet has not finished. This also guarantees that the * handler yet has not finished. This also guarantees that the
* timer is serialized wrt itself. * timer is serialized wrt itself.
*/ */
@@ -1265,7 +1265,7 @@ EXPORT_SYMBOL_GPL(add_timer_on);
* @timer: The timer to be deactivated * @timer: The timer to be deactivated
* *
* The function only deactivates a pending timer, but contrary to * The function only deactivates a pending timer, but contrary to
* timer_delete_sync() it does not take into account whether the timer's * del_timer_sync() it does not take into account whether the timer's
* callback function is concurrently executed on a different CPU or not. * callback function is concurrently executed on a different CPU or not.
* It neither prevents rearming of the timer. If @timer can be rearmed * It neither prevents rearming of the timer. If @timer can be rearmed
* concurrently then the return value of this function is meaningless. * concurrently then the return value of this function is meaningless.
@@ -1401,7 +1401,7 @@ static inline void del_timer_wait_running(struct timer_list *timer) { }
#endif #endif
/** /**
* timer_delete_sync - Deactivate a timer and wait for the handler to finish. * del_timer_sync - Deactivate a timer and wait for the handler to finish.
* @timer: The timer to be deactivated * @timer: The timer to be deactivated
* *
* Synchronization rules: Callers must prevent restarting of the timer, * Synchronization rules: Callers must prevent restarting of the timer,
@@ -1423,10 +1423,10 @@ static inline void del_timer_wait_running(struct timer_list *timer) { }
* spin_lock_irq(somelock); * spin_lock_irq(somelock);
* <IRQ> * <IRQ>
* spin_lock(somelock); * spin_lock(somelock);
* timer_delete_sync(mytimer); * del_timer_sync(mytimer);
* while (base->running_timer == mytimer); * while (base->running_timer == mytimer);
* *
* Now timer_delete_sync() will never return and never release somelock. * Now del_timer_sync() will never return and never release somelock.
* The interrupt on the other CPU is waiting to grab somelock but it has * The interrupt on the other CPU is waiting to grab somelock but it has
* interrupted the softirq that CPU0 is waiting to finish. * interrupted the softirq that CPU0 is waiting to finish.
* *
@@ -1439,7 +1439,7 @@ static inline void del_timer_wait_running(struct timer_list *timer) { }
* * %0 - The timer was not pending * * %0 - The timer was not pending
* * %1 - The timer was pending and deactivated * * %1 - The timer was pending and deactivated
*/ */
int timer_delete_sync(struct timer_list *timer) int del_timer_sync(struct timer_list *timer)
{ {
int ret; int ret;
@@ -1479,7 +1479,7 @@ int timer_delete_sync(struct timer_list *timer)
return ret; return ret;
} }
EXPORT_SYMBOL(timer_delete_sync); EXPORT_SYMBOL(del_timer_sync);
static void call_timer_fn(struct timer_list *timer, static void call_timer_fn(struct timer_list *timer,
void (*fn)(struct timer_list *), void (*fn)(struct timer_list *),
@@ -1501,8 +1501,8 @@ static void call_timer_fn(struct timer_list *timer,
#endif #endif
/* /*
* Couple the lock chain with the lock chain at * Couple the lock chain with the lock chain at
* timer_delete_sync() by acquiring the lock_map around the fn() * del_timer_sync() by acquiring the lock_map around the fn()
* call here and in timer_delete_sync(). * call here and in del_timer_sync().
*/ */
lock_map_acquire(&lockdep_map); lock_map_acquire(&lockdep_map);