Thread (31 messages) 31 messages, 6 authors, 13h ago

[PATCH RFC 06/11] dyndbg: make _ddebug::flags its own field

flat view
HOTtoday

From: Thomas Weißschuh <linux@weissschuh.net>
Date: 2026-10-11 12:53:12
Also in: driver-core, linux-kselftest, lkml, rust-for-linux
Subsystem: dynamic debug, the rest · Maintainers: Jason Baron, Jim Cromie, Linus Torvalds

Keeping the flags as part of the bitfield prevents the usage of
READ_ONCE()/WRITE_ONCE() with it. It also makes access from Rust
awkward.

Make it a dedicated field.

The new field will stay in the exact same location in the parent
structure.

No functional change.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
 include/linux/dynamic_debug.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h
index 0b34343df594..b1ff7c0e9a5f 100644
--- a/include/linux/dynamic_debug.h
+++ b/include/linux/dynamic_debug.h
@@ -51,7 +51,7 @@ struct _ddebug {
 #else
 #define _DPRINTK_FLAGS_DEFAULT 0
 #endif
-	u32 flags:8;
+	u8 flags;
 #ifdef CONFIG_JUMP_LABEL
 	union {
 		struct static_key_true dd_key_true;
-- 
2.56.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help