summaryrefslogtreecommitdiff
path: root/include/linux/execmem.h
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2026-05-08 08:18:37 +0300
committerMichael S. Tsirkin <mst@redhat.com>2026-06-10 09:17:00 +0300
commit4d130b63bd08b789f70a9f4a7af33104cc8cebce (patch)
treec5301222a13514e2d5bf82173673fb1ce014cab0 /include/linux/execmem.h
parente13fc46b4dd1e8f8bb913229dc307bf1ce08ea77 (diff)
downloadlinux-4d130b63bd08b789f70a9f4a7af33104cc8cebce.tar.xz
vdpa/mlx5: Use kvzalloc_flex() for MTT command memory
The create mkey command memory embeds the MTT array as a flexible array member. Use kvzalloc_flex() to allocate it directly instead of open-coding the struct_size() calculation with kvcalloc(). The MTT allocation still needs to be aligned to MLX5_VDPA_MTT_ALIGN bytes. Since each MTT entry is __be64, align the entry count directly and avoid carrying a separate byte length variable. Assisted-by: Codex:GPT-5.5 Signed-off-by: Rosen Penev <rosenp@gmail.com> Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Message-ID: <20260508051837.1744409-1-rosenp@gmail.com>
Diffstat (limited to 'include/linux/execmem.h')
0 files changed, 0 insertions, 0 deletions