This is an automatic generated email to let you know that the following patch were queued:
Subject: media: vde: Use struct_size() Author: Christophe JAILLET <christophe.jail...@wanadoo.fr> Date: Sat Oct 7 15:50:02 2023 +0200 Use struct_size() which is much more common than this offsetof(). Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> Signed-off-by: Hans Verkuil <hverkuil-ci...@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mche...@kernel.org> drivers/media/platform/nvidia/tegra-vde/v4l2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- diff --git a/drivers/media/platform/nvidia/tegra-vde/v4l2.c b/drivers/media/platform/nvidia/tegra-vde/v4l2.c index bd8c207d5b54..0f48ce6f243e 100644 --- a/drivers/media/platform/nvidia/tegra-vde/v4l2.c +++ b/drivers/media/platform/nvidia/tegra-vde/v4l2.c @@ -813,7 +813,7 @@ static int tegra_open(struct file *file) struct tegra_ctx *ctx; int err; - ctx = kzalloc(offsetof(struct tegra_ctx, ctrls[ARRAY_SIZE(ctrl_cfgs)]), + ctx = kzalloc(struct_size(ctx, ctrls, ARRAY_SIZE(ctrl_cfgs)), GFP_KERNEL); if (!ctx) return -ENOMEM; _______________________________________________ linuxtv-commits mailing list linuxtv-commits@linuxtv.org https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits