[PATCH] rust: fix clippy::too-long-first-doc-paragraph
From: Benno Lossin
Date: Sat Feb 15 2025 - 17:31:40 EST
When running `make LLVM=1 CLIPPY=1` on my machine, I get this error:
error: first doc comment paragraph is too long
--> rust/kernel/driver.rs:13:1
|
13 | / /// The [`RegistrationOps`] trait serves as generic interface for subsystems (e.g., PCI, Platform,
14 | | /// Amba, etc.) to provide the corresponding subsystem specific implementation to register /
15 | | /// unregister a driver of the particular type (`RegType`).
16 | | ///
17 | | /// For instance, the PCI subsystem would set `RegType` to `bindings::pci_driver` and call
| |_
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_long_first_doc_paragraph
= note: `-D clippy::too-long-first-doc-paragraph` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::too_long_first_doc_paragraph)]`
Thus add a short one-line description.
Fixes: ea7e18289f44 ("rust: implement generic driver registration")
Signed-off-by: Benno Lossin <benno.lossin@xxxxxxxxx>
---
The error also occurs in v6.14-rc1, so it must have slipped through our
testing, which I find a bit strange. Also nobody reported it for rc1, so
maybe this is only something that I encountered?
---
rust/kernel/driver.rs | 2 ++
1 file changed, 2 insertions(+)
diff --git a/rust/kernel/driver.rs b/rust/kernel/driver.rs
index 2a16d5e64e6c..65c9c1776556 100644
--- a/rust/kernel/driver.rs
+++ b/rust/kernel/driver.rs
@@ -10,6 +10,8 @@
use core::pin::Pin;
use macros::{pin_data, pinned_drop};
+/// Generic interface for subsystem driver registrations.
+///
/// The [`RegistrationOps`] trait serves as generic interface for subsystems (e.g., PCI, Platform,
/// Amba, etc.) to provide the corresponding subsystem specific implementation to register /
/// unregister a driver of the particular type (`RegType`).
base-commit: a64dcfb451e254085a7daee5fe51bf22959d52d3
--
2.46.0