Re: [PATCH] UAPI/ioctl: Improve parameter name of ioctl request definition helpers
From: Arnd Bergmann
Date: Fri Jul 12 2024 - 05:52:19 EST
On Fri, Jul 12, 2024, at 11:35, Uwe Kleine-König wrote:
> The third parameter to _IOR et al is a type name, not a size. So the
> parameter being named "size" is irritating. Rename it to "argtype"
> instead to reduce confusion.
>
> There is a very minor chance that this breaks stuff. It only hurts
> however if there is a variable (or macro) in userspace that is called
> "argtype" *and* it's used in the parameters of _IOR and friends. IMHO
> this is negligible because usually definitions making use of these
> macros are provided by kernel headers (i.e. us) or if they are
> replicated in userspace code, they are replicated and so supposed to
> match the kernel definitions (e.g. to make them usable by programs
> without the need to update the kernel headers used to compile the
> program).
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxx>
> ---
> Hello,
>
> if there are doubts about using "argtype": Would "_argtype" be better?
The patch looks good to me, and I think using 'argtype'
is fine. I would apply it directly, but not with the current
timing just ahead of the merge window.
If there are no other comments, how about I take this after -rc1?
You may have to remind me about it.
Arnd