]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: mali-c55: Assert ISP blocks size correctness
authorJacopo Mondi <jacopo.mondi@ideasonboard.com>
Fri, 14 Nov 2025 11:02:12 +0000 (12:02 +0100)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Fri, 14 Nov 2025 14:48:49 +0000 (15:48 +0100)
For each supported ISP block type the v4l2-isp framework expects
one handler and one block type info.

Static assert that the array of handlers is of the same size of the
array of block types info.

Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/platform/arm/mali-c55/mali-c55-params.c

index c643cd013e4682cbd37114aa7101185ca2381bac..082cda4f4f63e880162896ff0f893cd774982d51 100644 (file)
@@ -465,6 +465,9 @@ mali_c55_params_block_types_info[] = {
        },
 };
 
+static_assert(ARRAY_SIZE(mali_c55_params_handlers) ==
+             ARRAY_SIZE(mali_c55_params_block_types_info));
+
 static int mali_c55_params_enum_fmt_meta_out(struct file *file, void *fh,
                                             struct v4l2_fmtdesc *f)
 {