Skip to content

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