Re: [PATCH] fbdev: pvr2fb: correct user pointer annotation and sentinel initializer

From: Uwe Kleine-König

Date: Sat Jul 18 2026 - 17:59:41 EST


On Mon, Jul 13, 2026 at 12:16:38PM +0200, Florian Fuchs wrote:
> Add __user annotation to buf, as it is passed as a user pointer in
> pin_user_pages_fast(). Use an empty initializer for the sentinel
> board-table entry to avoid initializing a function pointer with an
> integer literal.

FTR: Using 0 in an initializer is covered by the C standard. Anyhow, I
agree that { } is nicer.

Having said that, I think the right thing to do here is to drop the
sentinel entry, because board_driver[] is only used in for loops that
iterate between 0 (inclusive) and ARRAY_SIZE(board_driver) (exclusive).

Also I would split this patch in two.

Best regards
Uwe

Attachment: signature.asc
Description: PGP signature