Skip to content

Conversation

@namiltd
Copy link
Contributor

@namiltd namiltd commented Jan 29, 2026

Replace the two-step hrtimer initialization pattern with a single consolidated call to hrtimer_setup().
The legacy approach of calling hrtimer_init() followed by manual assignment to timer.function is deprecated.
The new hrtimer_setup() helper atomically initializes the timer and assigns the callback function in one operation,
eliminating the race-prone intermediate state where the timer is initialized but lacks a handler.
The patch allows for correct compilation on kernel 6.18.

Link: https://lore.kernel.org/all/71fbc442aee9a9e892e475f3bbf8f368c6692a55.1738746872.git.namcao@linutronix.de

@namiltd
Copy link
Contributor Author

namiltd commented Jan 29, 2026

Ping @nbd168

Replace the two-step hrtimer initialization pattern with a single
consolidated call to hrtimer_setup().
The legacy approach of calling hrtimer_init() followed by manual
assignment to timer.function is deprecated. The new hrtimer_setup()
helper atomically initializes the timer and assigns the callback
function in one operation, eliminating the race-prone intermediate
state where the timer is initialized but lacks a handler.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant