On Tue Aug 12 11:53:04 2025 +0800, Qianfeng Rong wrote:
> Remove array_size() calls and replace vmalloc(array_size()) with
> vmalloc_array() and vzalloc(array_size()) with vcalloc() to simplify
> the code.
>
> Signed-off-by: Qianfeng Rong <[email protected]>
> Signed-off-by: Hans Verkuil <[email protected]>
Patch committed.
Thanks,
Hans Verkuil
drivers/media/test-drivers/vivid/vivid-core.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/drivers/media/test-drivers/vivid/vivid-core.c
b/drivers/media/test-drivers/vivid/vivid-core.c
index 86506be36acb..9c0b1a32b5c9 100644
--- a/drivers/media/test-drivers/vivid/vivid-core.c
+++ b/drivers/media/test-drivers/vivid/vivid-core.c
@@ -1856,15 +1856,15 @@ static int vivid_create_instance(struct platform_device
*pdev, int inst)
tpg_init(&dev->tpg, 640, 360);
if (tpg_alloc(&dev->tpg, array_size(MAX_WIDTH, MAX_ZOOM)))
goto free_dev;
- dev->scaled_line = vzalloc(array_size(MAX_WIDTH, MAX_ZOOM));
+ dev->scaled_line = vcalloc(MAX_WIDTH, MAX_ZOOM);
if (!dev->scaled_line)
goto free_dev;
- dev->blended_line = vzalloc(array_size(MAX_WIDTH, MAX_ZOOM));
+ dev->blended_line = vcalloc(MAX_WIDTH, MAX_ZOOM);
if (!dev->blended_line)
goto free_dev;
/* load the edid */
- dev->edid = vmalloc(array_size(256, 128));
+ dev->edid = vmalloc_array(256, 128);
if (!dev->edid)
goto free_dev;
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]