From ebb2b81a2d063675a09186a9dffd627ce50e5b9b Mon Sep 17 00:00:00 2001 From: Pavel Begunkov Date: Fri, 7 Aug 2026 14:19:24 +0100 Subject: [PATCH] io_uring/zcrx: constify area_reg on import io_import_area() doesn't modify its struct io_uring_zcrx_area_reg argument, add const to enforce that, it'll make later modifications easier. Signed-off-by: Pavel Begunkov Link: https://patch.msgid.link/2cd4a3e43875576587c900ebdf8f1fb4af266e4a.1786108672.git.asml.silence@gmail.com Signed-off-by: Jens Axboe --- io_uring/zcrx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c index 6d196858f5c7..07f40267571a 100644 --- a/io_uring/zcrx.c +++ b/io_uring/zcrx.c @@ -136,7 +136,7 @@ static void io_release_dmabuf(struct io_zcrx_mem *mem) static int io_import_dmabuf(struct io_zcrx_ifq *ifq, struct io_zcrx_mem *mem, - struct io_uring_zcrx_area_reg *area_reg) + const struct io_uring_zcrx_area_reg *area_reg) { unsigned long off = (unsigned long)area_reg->addr; unsigned long len = (unsigned long)area_reg->len; @@ -208,7 +208,7 @@ static unsigned long io_count_account_pages(struct page **pages, unsigned nr_pag static int io_import_umem(struct io_zcrx_ifq *ifq, struct io_zcrx_mem *mem, - struct io_uring_zcrx_area_reg *area_reg) + const struct io_uring_zcrx_area_reg *area_reg) { struct page **pages; int nr_pages, ret; @@ -274,7 +274,7 @@ static void io_release_area_mem(struct io_zcrx_mem *mem) static int io_import_area(struct io_zcrx_ifq *ifq, struct io_zcrx_mem *mem, - struct io_uring_zcrx_area_reg *area_reg) + const struct io_uring_zcrx_area_reg *area_reg) { int ret;