Re: [PATCH] selftests/user_events: cast pointers through uintptr_t

From: Sasha Levin

Date: Thu Nov 05 2026 - 07:56:25 EST


On Thu, Nov 05, 2026 at 11:03:33AM +0000, David Laight wrote:
>On Tue, 3 Nov 2026 11:39:13 -0500
>Sasha Levin <sashal@xxxxxxxxxx> wrote:
>
>> reg.size = sizeof(reg);
>> - reg.name_args = (__u64)full_args;
>> + reg.name_args = (__u64)(uintptr_t)full_args;
>
>I'm sure you can't need both casts.

It works as is, but you're right, the assignment widens the uintptr_t on its
own and the (__u64) isn't needed. Happy to respin without it if the maintainers
prefer.

--
Thanks,
Sasha