Re: [PATCH RFC] soc: qcom: socinfo: Re-implement in Rust
From: Bryan O'Donoghue
Date: Fri Dec 12 2025 - 21:50:26 EST
On 13/12/2025 00:36, Matthew Maurer wrote:
+//! Re-implementation of Qualcomm's Socinfo driver in Rust
+use core::fmt;
+use core::fmt::Formatter;
+use kernel::debugfs::{Scope, ScopedDir};
+use kernel::device::Core;
+use kernel::module_platform_driver;
+use kernel::platform::{self, Device};
+use kernel::prelude::{fmt, pin_data, Error, PinInit, Result};
+use kernel::soc;
+use kernel::str::{CStr, CStrExt, CString};
+use kernel::transmute::FromBytes;
+use kernel::{c_str, pr_warn, try_pin_init};
+use pin_init::pin_init_scope;
Probably learning more from your patch than being in a position to review - thanks for that.
One thing I notice is that, in C we alphabetise the includes.
What is the normative coding standard for rust stuff I'm not sure. Is there any technical reason not to do the same as C includes alphabetising ?
You appear to sort these kernel:: use statements earlier on in the patch.
---
bod