[PATCH v2 14/83] block: rust: mq: use GFP_KERNEL from prelude

From: Andreas Hindborg

Date: Tue Jun 09 2026 - 15:15:29 EST


Remove the explicit import of kernel::alloc::flags and use GFP_KERNEL
directly from the prelude in the module documentation example.

This simplifies the import list and follows the pattern of using
commonly used constants from the prelude.

Reviewed-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>
Signed-off-by: Andreas Hindborg <a.hindborg@xxxxxxxxxx>
---
rust/kernel/block/mq.rs | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/rust/kernel/block/mq.rs b/rust/kernel/block/mq.rs
index a03d46d274a5..23660817df29 100644
--- a/rust/kernel/block/mq.rs
+++ b/rust/kernel/block/mq.rs
@@ -57,7 +57,6 @@
//!
//! ```rust
//! use kernel::{
-//! alloc::flags,
//! block::mq::*,
//! new_mutex,
//! prelude::*,
@@ -93,7 +92,7 @@
//! }
//!
//! let tagset: Arc<TagSet<MyBlkDevice>> =
-//! Arc::pin_init(TagSet::new(1, 256, 1), flags::GFP_KERNEL)?;
+//! Arc::pin_init(TagSet::new(1, 256, 1), GFP_KERNEL)?;
//! let mut disk = gen_disk::GenDiskBuilder::new()
//! .capacity_sectors(4096)
//! .build(fmt!("myblk"), tagset, ())?;

--
2.51.2