Thread (8 messages) 8 messages, 2 authors, 2026-01-14

Re: [PATCH net-next v19 2/6] eea: introduce ring and descriptor structures

From: Jakub Kicinski <kuba@kernel.org>
Date: 2026-01-14 01:23:56

On Tue, 13 Jan 2026 09:18:52 +0800 Xuan Zhuo wrote:
+void ering_irq_unactive(struct eea_ring *ering)
+{
+	union {
+		u64 data;
+		struct eea_db db;
+	} val;
+
+	if (ering->mask == EEA_IRQ_MASK)
+		return;
+
+	ering->mask = EEA_IRQ_MASK;
+
+	val.db.kick_flags = EEA_IRQ_MASK;
+
+	writeq(val.data, (void __iomem *)ering->db);
+}
AI code review points out that this is writing out a partially
initialized structure. You're only setting kick_flags, so 1byte
and the other 7 bytes are whatever was there before on the stack.
This needs to be fixed.

In general we recommend using FIELD_PREP()-family of macros to encode
bitfields.
-- 
pw-bot: cr
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help