[PATCH 1/2] platform/raspberrypi: vchiq: pass FOLL_WRITE to pin_user_pages_fast()

Tal Zussman tz2294 at columbia.edu
Sat Oct 31 10:52:08 PDT 2026


create_pagelist() passes the result of a comparison as the gup flags,
which only works because FOLL_WRITE happens to be bit 0. Pass the flag
by name.

No functional change.

Signed-off-by: Tal Zussman <tz2294 at columbia.edu>
---
 drivers/platform/raspberrypi/vchiq-interface/vchiq_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/raspberrypi/vchiq-interface/vchiq_core.c b/drivers/platform/raspberrypi/vchiq-interface/vchiq_core.c
index 48d6b1d74329..3ae4ee2973de 100644
--- a/drivers/platform/raspberrypi/vchiq-interface/vchiq_core.c
+++ b/drivers/platform/raspberrypi/vchiq-interface/vchiq_core.c
@@ -1592,7 +1592,7 @@ create_pagelist(struct vchiq_instance *instance, struct vchiq_bulk *bulk)
 	} else {
 		actual_pages =
 			pin_user_pages_fast((unsigned long)bulk->uoffset & PAGE_MASK, num_pages,
-					    type == PAGELIST_READ, pages);
+					    type == PAGELIST_READ ? FOLL_WRITE : 0, pages);
 
 		if (actual_pages != num_pages) {
 			dev_dbg(instance->state->dev, "arm: Only %d/%d pages locked\n",

-- 
2.39.5




More information about the linux-rpi-kernel mailing list