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: support !CONFIG_PRINTK #669

Merged
merged 1 commit into from
Feb 11, 2022
Merged

Conversation

ojeda
Copy link
Member

@ojeda ojeda commented Feb 11, 2022

Link: https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org/thread/AN5PWUJVWHIFUUZYRJHXFGXBMSNUPSIL/
Reported-by: kernel test robot lkp@intel.com
Signed-off-by: Miguel Ojeda ojeda@kernel.org


A note on the conditional compilation: short of automating it in some way one layer above in the bindings or using macros, I think this approach (similar to the one in the C side, though a bit more verbose) may be a good balance between disabling unused imports/variables warnings globally (too lax, even if only for a given config option) and for each parameter (very noisy).

It would be nice if there was an allow(unused_parameters), i.e. more restricted than all variables. Or even better, a way to restrict the allow to the signature (without having to repeat it for each parameter and without losing the warning for the other case).

Link: https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org/thread/AN5PWUJVWHIFUUZYRJHXFGXBMSNUPSIL/
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
@ojeda ojeda merged commit b5d158b into Rust-for-Linux:rust Feb 11, 2022
@ojeda ojeda deleted the printk branch February 11, 2022 01:12
@ojeda ojeda mentioned this pull request Feb 11, 2022
39 tasks
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.

1 participant