Skip to content
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

rust/kernel: remove config #ifdef in mutex.rs file #357

Merged
merged 1 commit into from
Jun 8, 2021

Conversation

TheSven73
Copy link
Collaborator

The use of #ifdef CONFIG_ statements in .c/.rs files should be
avoided: it makes the code much more unmaintainable over time. See:
https://lore.kernel.org/lkml/YLjWKwhp7akqyR1S@kroah.com/

Use a Rust-C helper instead to leverage automatic CONFIG selection
in C kernel headers.

Signed-off-by: Sven Van Asbroeck thesven73@gmail.com

The use of `#ifdef CONFIG_` statements in .c/.rs files should be
avoided: it makes the code much more unmaintainable over time. See:
https://lore.kernel.org/lkml/YLjWKwhp7akqyR1S@kroah.com/

Use a Rust-C helper instead to leverage automatic `CONFIG` selection
in C kernel headers.

Signed-off-by: Sven Van Asbroeck <thesven73@gmail.com>
@ksquirrel
Copy link
Member

Review of a8553d87d15b:

  • ✔️ Commit a8553d8: Looks fine!

@ojeda
Copy link
Member

ojeda commented Jun 5, 2021

LGTM

@ojeda ojeda merged commit 7764b8c into Rust-for-Linux:rust Jun 8, 2021
@TheSven73 TheSven73 deleted the rust-for-linux-no-ifdefs2 branch June 8, 2021 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants