Linux io-uring development
 help / color / mirror / Atom feed
* [PATCH] io_uring: parenthesize io_ring_head_to_buf() expansion
@ 2026-05-14  8:34 Yi Xie
  2026-05-14 13:24 ` Jens Axboe
  2026-05-14 14:22 ` Caleb Sander Mateos
  0 siblings, 2 replies; 8+ messages in thread
From: Yi Xie @ 2026-05-14  8:34 UTC (permalink / raw)
  To: io-uring; +Cc: Jens Axboe, Yi Xie

Wrap the io_ring_head_to_buf() macro value in an extra pair of parentheses
so it is safe when composed into larger expressions, and to satisfy
scripts/checkpatch.pl.

Signed-off-by: Yi Xie <xieyi@kylinos.cn>
---
 io_uring/kbuf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/io_uring/kbuf.c b/io_uring/kbuf.c
index 63061aa1cab9..dd54e43e9ddf 100644
--- a/io_uring/kbuf.c
+++ b/io_uring/kbuf.c
@@ -21,7 +21,7 @@
 #define MAX_BIDS_PER_BGID (1 << 16)
 
 /* Mapped buffer ring, return io_uring_buf from head */
-#define io_ring_head_to_buf(br, head, mask)	&(br)->bufs[(head) & (mask)]
+#define io_ring_head_to_buf(br, head, mask)	(&(br)->bufs[(head) & (mask)])
 
 struct io_provide_buf {
 	struct file			*file;

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-05-14 15:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-14  8:34 [PATCH] io_uring: parenthesize io_ring_head_to_buf() expansion Yi Xie
2026-05-14 13:24 ` Jens Axboe
2026-05-14 14:22 ` Caleb Sander Mateos
2026-05-14 14:25   ` Jens Axboe
2026-05-14 14:43     ` Caleb Sander Mateos
2026-05-14 14:44       ` Jens Axboe
2026-05-14 14:58     ` Gabriel Krisman Bertazi
2026-05-14 15:02       ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox