diff options
author | Thorsten Blum <thorsten.blum@linux.dev> | 2025-09-16 14:21:45 +0200 |
---|---|---|
committer | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2025-09-18 00:29:48 +0900 |
commit | e6d2338b6f3e522872f3a14fcc5e5de2f58bf23b (patch) | |
tree | 4dd89324bc42cb3530d811ee766fe2fc6327145d /rust/helpers/blk.c | |
parent | 582310376d6e9a8d261b682178713cdc4b251af6 (diff) |
firewire: core: use struct_size and flex_array_size in ioctl_add_descriptor
Use struct_size() to determine the memory needed for a new 'struct
descriptor_resource' and flex_array_size() to calculate the number of
bytes to copy from userspace. This removes the hardcoded size (4 bytes)
for the 'u32 data[]' entries.
No functional changes intended.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://lore.kernel.org/r/20250916122143.2459993-3-thorsten.blum@linux.dev
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Diffstat (limited to 'rust/helpers/blk.c')
0 files changed, 0 insertions, 0 deletions