Skip to content

Commit 5e8bbb2

Browse files
committed
Merge tag 'timers-cleanups-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer cleanups from Thomas Gleixner: "Another set of timer API cleanups: - Convert init_timer*(), try_to_del_timer_sync() and destroy_timer_on_stack() over to the canonical timer_*() namespace convention. There is another large conversion pending, which has not been included because it would have caused a gazillion of merge conflicts in next. The conversion scripts will be run towards the end of the merge window and a pull request sent once all conflict dependencies have been merged" * tag 'timers-cleanups-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: treewide, timers: Rename destroy_timer_on_stack() as timer_destroy_on_stack() treewide, timers: Rename try_to_del_timer_sync() as timer_delete_sync_try() timers: Rename init_timers() as timers_init() timers: Rename NEXT_TIMER_MAX_DELTA as TIMER_NEXT_MAX_DELTA timers: Rename __init_timer_on_stack() as __timer_init_on_stack() timers: Rename __init_timer() as __timer_init() timers: Rename init_timer_on_stack_key() as timer_init_key_on_stack() timers: Rename init_timer_key() as timer_init_key()
2 parents 44ed0f3 + aad823a commit 5e8bbb2

File tree

29 files changed

+78
-78
lines changed

29 files changed

+78
-78
lines changed

arch/powerpc/kvm/booke.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ static int kvmppc_booke_irqprio_deliver(struct kvm_vcpu *vcpu,
572572

573573
/*
574574
* Return the number of jiffies until the next timeout. If the timeout is
575-
* longer than the NEXT_TIMER_MAX_DELTA, then return NEXT_TIMER_MAX_DELTA
575+
* longer than the TIMER_NEXT_MAX_DELTA, then return TIMER_NEXT_MAX_DELTA
576576
* because the larger value can break the timer APIs.
577577
*/
578578
static unsigned long watchdog_next_timeout(struct kvm_vcpu *vcpu)
@@ -598,7 +598,7 @@ static unsigned long watchdog_next_timeout(struct kvm_vcpu *vcpu)
598598
if (do_div(nr_jiffies, tb_ticks_per_jiffy))
599599
nr_jiffies++;
600600

601-
return min_t(unsigned long long, nr_jiffies, NEXT_TIMER_MAX_DELTA);
601+
return min_t(unsigned long long, nr_jiffies, TIMER_NEXT_MAX_DELTA);
602602
}
603603

604604
static void arm_next_watchdog(struct kvm_vcpu *vcpu)
@@ -616,10 +616,10 @@ static void arm_next_watchdog(struct kvm_vcpu *vcpu)
616616
spin_lock_irqsave(&vcpu->arch.wdt_lock, flags);
617617
nr_jiffies = watchdog_next_timeout(vcpu);
618618
/*
619-
* If the number of jiffies of watchdog timer >= NEXT_TIMER_MAX_DELTA
619+
* If the number of jiffies of watchdog timer >= TIMER_NEXT_MAX_DELTA
620620
* then do not run the watchdog timer as this can break timer APIs.
621621
*/
622-
if (nr_jiffies < NEXT_TIMER_MAX_DELTA)
622+
if (nr_jiffies < TIMER_NEXT_MAX_DELTA)
623623
mod_timer(&vcpu->arch.wdt_timer, jiffies + nr_jiffies);
624624
else
625625
timer_delete(&vcpu->arch.wdt_timer);

arch/x86/kernel/apic/vector.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@ void lapic_offline(void)
864864
__vector_cleanup(cl, false);
865865

866866
irq_matrix_offline(vector_matrix);
867-
WARN_ON_ONCE(try_to_del_timer_sync(&cl->timer) < 0);
867+
WARN_ON_ONCE(timer_delete_sync_try(&cl->timer) < 0);
868868
WARN_ON_ONCE(!hlist_empty(&cl->head));
869869

870870
unlock_vector_lock();

drivers/base/power/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ static void dpm_watchdog_clear(struct dpm_watchdog *wd)
560560
struct timer_list *timer = &wd->timer;
561561

562562
timer_delete_sync(timer);
563-
destroy_timer_on_stack(timer);
563+
timer_destroy_on_stack(timer);
564564
}
565565
#else
566566
#define DECLARE_DPM_WATCHDOG_ON_STACK(wd)

drivers/char/random.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1312,9 +1312,9 @@ static void __cold try_to_generate_entropy(void)
13121312
while (!crng_ready() && !signal_pending(current)) {
13131313
/*
13141314
* Check !timer_pending() and then ensure that any previous callback has finished
1315-
* executing by checking try_to_del_timer_sync(), before queueing the next one.
1315+
* executing by checking timer_delete_sync_try(), before queueing the next one.
13161316
*/
1317-
if (!timer_pending(&stack->timer) && try_to_del_timer_sync(&stack->timer) >= 0) {
1317+
if (!timer_pending(&stack->timer) && timer_delete_sync_try(&stack->timer) >= 0) {
13181318
struct cpumask timer_cpus;
13191319
unsigned int num_cpus;
13201320

@@ -1354,7 +1354,7 @@ static void __cold try_to_generate_entropy(void)
13541354
mix_pool_bytes(&stack->entropy, sizeof(stack->entropy));
13551355

13561356
timer_delete_sync(&stack->timer);
1357-
destroy_timer_on_stack(&stack->timer);
1357+
timer_destroy_on_stack(&stack->timer);
13581358
}
13591359

13601360

drivers/dma-buf/st-dma-fence.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ static int test_wait_timeout(void *arg)
413413
err = 0;
414414
err_free:
415415
timer_delete_sync(&wt.timer);
416-
destroy_timer_on_stack(&wt.timer);
416+
timer_destroy_on_stack(&wt.timer);
417417
dma_fence_signal(wt.f);
418418
dma_fence_put(wt.f);
419419
return err;

drivers/firewire/core-transaction.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ int fw_run_transaction(struct fw_card *card, int tcode, int destination_id,
431431
fw_send_request(card, &t, tcode, destination_id, generation, speed,
432432
offset, payload, length, transaction_callback, &d);
433433
wait_for_completion(&d.done);
434-
destroy_timer_on_stack(&t.split_timeout_timer);
434+
timer_destroy_on_stack(&t.split_timeout_timer);
435435

436436
return d.rcode;
437437
}

drivers/firmware/psci/psci_checker.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ static int suspend_test_thread(void *arg)
343343
* later.
344344
*/
345345
timer_delete(&wakeup_timer);
346-
destroy_timer_on_stack(&wakeup_timer);
346+
timer_destroy_on_stack(&wakeup_timer);
347347

348348
if (atomic_dec_return_relaxed(&nb_active_threads) == 0)
349349
complete(&suspend_threads_done);

drivers/gpu/drm/gud/gud_pipe.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ static int gud_usb_bulk(struct gud_device *gdrm, size_t len)
261261
else if (ctx.sgr.bytes != len)
262262
ret = -EIO;
263263

264-
destroy_timer_on_stack(&ctx.timer);
264+
timer_destroy_on_stack(&ctx.timer);
265265

266266
return ret;
267267
}

drivers/gpu/drm/i915/gt/selftest_migrate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ static int live_emit_pte_full_ring(void *arg)
661661
out_rq:
662662
i915_request_add(rq); /* GEM_BUG_ON(rq->reserved_space > ring->space)? */
663663
timer_delete_sync(&st.timer);
664-
destroy_timer_on_stack(&st.timer);
664+
timer_destroy_on_stack(&st.timer);
665665
out_unpin:
666666
intel_context_unpin(ce);
667667
out_put:

drivers/gpu/drm/i915/selftests/lib_sw_fence.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ void timed_fence_fini(struct timed_fence *tf)
7777
if (timer_delete_sync(&tf->timer))
7878
i915_sw_fence_commit(&tf->fence);
7979

80-
destroy_timer_on_stack(&tf->timer);
80+
timer_destroy_on_stack(&tf->timer);
8181
i915_sw_fence_fini(&tf->fence);
8282
}
8383

0 commit comments

Comments
 (0)