linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/31] hrtimers: Consolidate hrtimer initialization - Part 2
@ 2025-02-05 10:38 Nam Cao
  2025-02-05 10:38 ` [PATCH v2 01/31] KVM: MIPS: Switch to use hrtimer_setup() Nam Cao
                   ` (30 more replies)
  0 siblings, 31 replies; 39+ messages in thread
From: Nam Cao @ 2025-02-05 10:38 UTC (permalink / raw)
  To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
	linux-kernel
  Cc: Nam Cao, Thomas Bogendoerfer, Michael Ellerman,
	Christian Borntraeger, Sean Christopherson, Marc Zyngier,
	Huacai Chen, Anup Patel, Sascha Hauer, Russell King,
	Peter Zijlstra, Paul E. McKenney, Andrew Morton, Jens Axboe,
	Oleg Nesterov, Christian Brauner, John Stultz, Alexei Starovoitov,
	Richard Weinberger, Wim Van Sebroeck, Steven Rostedt,
	Damien Le Moal, Rafael J. Wysocki, Heiko Stuebner, Herbert Xu

hrtimers is initialized with hrtimer_init(), and after that the timer's
callback function is setup separately. This separate initialization is
error prone and awkward to use.

hrtimer_setup() combines the initialization and is simpler to use.

Switch to use the new setup function. Most conversions were done with
Coccinelle, see the sematic patch below.

This series is intended to be applied to the tip tree.

v1 -> v2 https://lore.kernel.org/lkml/cover.1729864823.git.namcao@linutronix.de
  - rebase onto v6.14.rc1
---
virtual patch
@@ expression timer, clock, mode, func; @@
- hrtimer_init(timer, clock, mode);
  ...
- timer->function = func;
+ hrtimer_setup(timer, func, clock, mode);

@@ expression timer, clock, mode, func; @@
- hrtimer_init(&timer, clock, mode);
  ...
- timer.function = func;
+ hrtimer_setup(&timer, func, clock, mode);

@@ expression timer, clock, mode, func; @@
- hrtimer_init_on_stack(&timer, clock, mode);
  ...
- timer.function = func;
+ hrtimer_setup_on_stack(&timer, func, clock, mode);

@@ expression timer, clock, mode; @@
- hrtimer_init_sleeper_on_stack(timer, clock, mode);
+ hrtimer_setup_sleeper_on_stack(timer, clock, mode);

---
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
Cc: Sean Christopherson <seanjc@google.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: Anup Patel <anup@brainfault.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: "Paul E. McKenney" <paulmck@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Christian Brauner <brauner@kernel.org>
Cc: John Stultz <jstultz@google.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Richard Weinberger <richard@nod.at>
Cc: Wim Van Sebroeck <wim@linux-watchdog.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Damien Le Moal <dlemoal@kernel.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
---

 arch/arm/mach-imx/mmdc.c                       |  5 ++---
 arch/arm/mm/cache-l2x0-pmu.c                   |  3 +--
 arch/arm64/kvm/arch_timer.c                    |  7 +++----
 arch/loongarch/kvm/vcpu.c                      |  4 ++--
 arch/mips/kvm/mips.c                           |  5 ++---
 arch/powerpc/kernel/watchdog.c                 |  3 +--
 arch/powerpc/kvm/powerpc.c                     |  4 ++--
 arch/riscv/kvm/vcpu_timer.c                    |  7 ++++---
 arch/s390/kvm/interrupt.c                      |  3 +--
 arch/s390/kvm/kvm-s390.c                       |  4 ++--
 arch/x86/events/intel/uncore.c                 |  3 +--
 arch/x86/events/rapl.c                         |  3 +--
 arch/x86/kvm/hyperv.c                          |  3 +--
 arch/x86/kvm/i8254.c                           |  3 +--
 arch/x86/kvm/lapic.c                           |  5 ++---
 arch/x86/kvm/vmx/nested.c                      |  5 ++---
 arch/x86/kvm/xen.c                             |  4 ++--
 block/bfq-iosched.c                            |  5 ++---
 block/blk-iocost.c                             |  3 +--
 drivers/ata/pata_octeon_cf.c                   |  5 ++---
 drivers/base/power/runtime.c                   |  4 ++--
 drivers/block/null_blk/main.c                  |  7 +++----
 drivers/char/hw_random/timeriomem-rng.c        |  3 +--
 drivers/devfreq/event/rockchip-dfi.c           |  3 +--
 drivers/s390/crypto/ap_bus.c                   |  3 +--
 drivers/watchdog/softdog.c                     |  8 +++-----
 drivers/watchdog/watchdog_dev.c                |  4 ++--
 drivers/watchdog/watchdog_hrtimer_pretimeout.c |  4 ++--
 fs/timerfd.c                                   |  5 ++---
 fs/ubifs/io.c                                  |  3 +--
 io_uring/timeout.c                             | 13 ++++++-------
 kernel/bpf/helpers.c                           |  3 +--
 kernel/events/core.c                           |  7 +++----
 kernel/fork.c                                  |  3 +--
 kernel/sched/core.c                            |  3 +--
 kernel/sched/deadline.c                        |  6 ++----
 kernel/sched/fair.c                            |  8 ++++----
 kernel/sched/rt.c                              |  5 ++---
 kernel/time/ntp.c                              |  3 +--
 kernel/time/posix-timers.c                     |  7 +++----
 kernel/time/sched_clock.c                      |  3 +--
 kernel/time/tick-broadcast-hrtimer.c           |  3 +--
 kernel/time/tick-sched.c                       |  6 ++----
 kernel/trace/trace_osnoise.c                   |  6 ++----
 kernel/watchdog.c                              |  3 +--
 lib/test_objpool.c                             |  3 +--
 mm/slab_common.c                               |  4 ++--
 47 files changed, 87 insertions(+), 127 deletions(-)

-- 
2.39.5


^ permalink raw reply	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2025-02-13 13:43 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-05 10:38 [PATCH v2 00/31] hrtimers: Consolidate hrtimer initialization - Part 2 Nam Cao
2025-02-05 10:38 ` [PATCH v2 01/31] KVM: MIPS: Switch to use hrtimer_setup() Nam Cao
2025-02-05 10:38 ` [PATCH v2 02/31] KVM: PPC: " Nam Cao
2025-02-05 10:38 ` [PATCH v2 03/31] KVM: s390: " Nam Cao
2025-02-07 10:29   ` Christian Borntraeger
2025-02-05 10:38 ` [PATCH v2 04/31] KVM: x86: " Nam Cao
2025-02-06 15:33   ` Sean Christopherson
2025-02-05 10:38 ` [PATCH v2 05/31] KVM: arm64: " Nam Cao
2025-02-05 10:38 ` [PATCH v2 06/31] LoongArch: KVM: " Nam Cao
2025-02-05 10:38 ` [PATCH v2 07/31] riscv: kvm: " Nam Cao
2025-02-05 10:38 ` [PATCH v2 08/31] ARM: imx: " Nam Cao
2025-02-05 10:38 ` [PATCH v2 09/31] ARM: 8611/1: l2x0: " Nam Cao
2025-02-05 10:38 ` [PATCH v2 10/31] powerpc/watchdog: " Nam Cao
2025-02-05 10:38 ` [PATCH v2 11/31] perf/x86: " Nam Cao
2025-02-05 10:38 ` [PATCH v2 12/31] s390/ap_bus: " Nam Cao
2025-02-05 10:38 ` [PATCH v2 13/31] sched: " Nam Cao
2025-02-05 10:38 ` [PATCH v2 14/31] mm/slab: " Nam Cao
2025-02-05 10:38 ` [PATCH v2 15/31] lib: test_objpool: " Nam Cao
2025-02-05 10:39 ` [PATCH v2 16/31] io_uring/timeout: " Nam Cao
2025-02-05 10:39 ` [PATCH v2 17/31] fork: " Nam Cao
2025-02-05 10:39 ` [PATCH v2 18/31] perf: " Nam Cao
2025-02-05 10:39 ` [PATCH v2 19/31] timerfd: " Nam Cao
2025-02-05 10:39 ` [PATCH v2 20/31] time: Switch to hrtimer_setup() Nam Cao
2025-02-05 10:39 ` [PATCH v2 21/31] bpf: Switch to use hrtimer_setup() Nam Cao
2025-02-05 10:39 ` [PATCH v2 22/31] ubifs: " Nam Cao
2025-02-10 19:36   ` Richard Weinberger
2025-02-05 10:39 ` [PATCH v2 23/31] watchdog: " Nam Cao
2025-02-11 16:16   ` Guenter Roeck
2025-02-13 11:16     ` Thomas Gleixner
2025-02-13 12:24       ` Guenter Roeck
2025-02-13 13:43         ` Nam Cao
2025-02-05 10:39 ` [PATCH v2 24/31] tracing/osnoise: " Nam Cao
2025-02-05 10:39 ` [PATCH v2 25/31] block, bfq: " Nam Cao
2025-02-05 10:39 ` [PATCH v2 26/31] ata: pata_octeon_cf: " Nam Cao
2025-02-05 10:39 ` [PATCH v2 27/31] blk_iocost: " Nam Cao
2025-02-05 10:39 ` [PATCH v2 28/31] PM: runtime: " Nam Cao
2025-02-05 10:39 ` [PATCH v2 29/31] PM / devfreq: rockchip-dfi: " Nam Cao
2025-02-05 10:39 ` [PATCH v2 30/31] null_blk: " Nam Cao
2025-02-05 10:39 ` [PATCH v2 31/31] hwrng: timeriomem: " Nam Cao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).