-
Notifications
You must be signed in to change notification settings - Fork 534
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
Allow GPIO example built with Linux v6.10+ #287
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use preprocessor directives for the compatibility among several Linux kernel versions.
I understand. I will fix it by using preprocessor directives. |
Ensure that LKM can be built with Linux v5.15, v6.1, and v6.6+. |
examples/bh_threaded.c
Outdated
/* gpio_request_array() and gpio_free_array() | ||
* were removed in kernel v6.10-rc1 . | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mention in git commit messages rather than program comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should denote the commit hash associated with the removal of gpio_request_array
and gpio_free_array
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have removed this comment and mentioned it in the commit message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, always squash and refine the messages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Read https://cbea.ms/git-commit/ carefully and enforce the rules. You should refine the git commit messages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have removed this comment and mentioned it in the commit message.
You must refer to the exact git commit hash and summarize the rationale.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix conflicts and use git rebase -i
to squash commits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Read https://cbea.ms/git-commit/ carefully and enforce the rules.
Thank you, I will make the necessary corrections. |
Demonstrate your solution through concrete actions rather than making verbal promises. |
Is there anything to improve in this commit? Thank you. |
Carefully study the principles of https://cbea.ms/git-commit/ . When writing a commit message, use the imperative mood in the subject line, specifically employing precise action verbs. For instance, use "Allow" rather than passive constructions. Take commit d2d54ca for example. We prefer the notation When contributing to a technical project, communication should be direct and purposeful. The phrase "Thank you" becomes unnecessary when the primary goal is collaborative technical work. In a professional development context, your interactions should focus on the technical details, code quality, and project improvement. |
1a1e5b7
to
ee6a0da
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compose Git commit messages in the third person, and include a test summary specific to Raspberry Pi deployment or testing.
Refine the git commit message as following:
And address the considerations of removal fro Linux kernel developers' perspectives. |
https://github.com/user-attachments/assets/bc43c25b-f02a-43c7-9bd1-a178f94b99f5 |
You should explain the testing procedure within git commit messages as well. |
My testing steps only include compiling, connecting an LED and a button, and finally loading the module. |
07f689e
to
d1658dc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebase the latest master
branch to pass CI pipeline.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace Resolves:#285
with shorter Close #285
.
Since the commit dbcedec ("gpiolib: legacy: Remove unused gpio_request_array() and gpio_free_array()"), these functions had no users in kernel and were subsequently removed to simplify the library. These functions have been removed from GPIO examples for Linux v6.10+ to ensure compatibility across all kernel versions. Testing detail: - Tested on Raspberry Pi 5B with Raspberry Pi OS (Debian 12, Linux version 6.12.1-v8-16k+) - Verified the GPIO examples compile and load successfully - Verified GPIO17 interrupt turns on the LED (GPIO4) - Verified GPIO18 interrupt turns off the LED (GPIO4) Close sysprog21#285
Thank @jeremy90307 for contributing! |
gpio_request_array() and gpio_free_array() were
removed in Kernel v6.10-rc1. Use gpio_request()
and gpio_free() instead to make the example run
successfully on v6.10+.