summaryrefslogtreecommitdiff
path: root/drivers/phy/eswin/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2026-06-02 20:17:58 -0700
committerMarek Szyprowski <m.szyprowski@samsung.com>2026-06-03 08:20:02 +0200
commit7318301e060e3f1207a34f2fca6cd86770dd9160 (patch)
treee19367c08ef8b85d431298b03966b36d3a5020d8 /drivers/phy/eswin/git@git.tavy.me:linux.git
parentd5cae2261b86913e602452ce4a07e6aefc0f603b (diff)
dma: map_benchmark: turn dma_sg_map_param buf into a flexible array
The buf pointer was kmalloc_array()'d immediately after the parent struct allocation, with the count (granule, validated to 1..1024 by the ioctl) trivially available beforehand. Move buf to the struct tail as a flexible array member and fold the two allocations into a single kzalloc_flex(), dropping the kfree(params->buf) in both the prepare error path and unprepare. Add __counted_by for extra runtime analysis. Assisted-by: Claude:Opus-4.7 Signed-off-by: Rosen Penev <rosenp@gmail.com> Reviewed-by: Qinxin Xia <xiaqinxin@huawei.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Link: https://lore.kernel.org/r/20260603031758.290538-1-rosenp@gmail.com
Diffstat (limited to 'drivers/phy/eswin/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions