# Re: \[PATCH\] selftests/user\_events: cast pointers through uintptr\_t

- From: Sasha Levin \<sashal@kernel.org\>
- Date: 2026-11-05 12:48:19 
- List: linux-trace-kernel
- Page: https://ratatoskr.run/linux-trace-kernel/2026/11/17870431
- Thread: https://ratatoskr.run/linux-trace-kernel/2026/11/17854649/t.md

```text
On Thu, Nov 05, 2026 at 11:03:33AM +0000, David Laight wrote:
>On Tue,  3 Nov 2026 11:39:13 -0500
>Sasha Levin [ref] 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
```
