Skip to content

Support Linux 6.15 about hrtimer_init #76

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

horseface1110
Copy link
Contributor

To align with the best practices recommended by Linux kernel v6.15 API. This commit replaces the deprecated hrtimer_init() with hrtimer_setup() which was introduced as its functional replacement.The new API requires a hrtimer_callback function pointer as one of the parameters. After examining the surrounding codebase,the appropriate callback function has been identified and passed accordingly.

ref:
torvalds/linux@9779489

@jserv jserv requested a review from jychen0611 May 30, 2025 17:38
Copy link
Collaborator

@jychen0611 jychen0611 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jychen0611 jychen0611 requested a review from jserv May 31, 2025 07:50
Copy link
Contributor

@jserv jserv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebase the latest main branch.

@horseface1110 horseface1110 force-pushed the fix/hrtimer-api-linux-6.15 branch from c9b1c9f to 1049d1c Compare June 5, 2025 02:50
Copy link
Contributor

@jserv jserv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refine git commit messages.

@horseface1110 horseface1110 force-pushed the fix/hrtimer-api-linux-6.15 branch from 1049d1c to a50af43 Compare June 6, 2025 04:01
Update hrtimer initialization to use the new hrtimer_setup() interface
introduced in Linux commit 908a1d7 (hrtimers: Introduce hrtimer_setup()
to replace hrtimer_init()),which replaces hrtimer_init() with a
type-safe and simplified API.

The new interface requires a hrtimer_callback function pointer to be
explicitly provided at initialization. This commit identifies and passes
the appropriate callback from the existing code to maintain equivalent
behavior.

The legacy hrtimer_init() remains available but is discouraged in new
code. Compatibility is preserved using version checks against
KERNEL_VERSION(6, 15, 0).
@horseface1110 horseface1110 force-pushed the fix/hrtimer-api-linux-6.15 branch from a50af43 to 4a4d55e Compare June 6, 2025 04:18
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.

3 participants