Re: [PATCH RFC] soc: qcom: socinfo: Re-implement in Rust
From: Greg KH
Date: Sat Dec 13 2025 - 08:57:26 EST
On Sat, Dec 13, 2025 at 12:36:00AM +0000, Matthew Maurer wrote:
> drivers/soc/qcom/Kconfig | 1 +
> drivers/soc/qcom/Makefile | 2 +-
> drivers/soc/qcom/socinfo.c | 931 -----------------------------------
> drivers/soc/qcom/socinfo/Makefile | 2 +
> drivers/soc/qcom/socinfo/bindings.rs | 59 +++
> drivers/soc/qcom/socinfo/data.rs | 424 ++++++++++++++++
> drivers/soc/qcom/socinfo/socinfo.rs | 362 ++++++++++++++
Shouldn't this all just be in 1 .rs file? By not doing that, you have a
number of public symbols (that are very generic), that will "pollute"
the global namespace of the kernel symbol table (unless rust does this
somehow differently?)
But putting this all in 1 file should solve all of that, and remove all
global symbols. Especially for just a small and simple driver like
this, no need to split it up at all.
thanks,
greg k-h