From 1435db44ec1c81ede88470ed3486a2f5a8765704 Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Fri, 14 Nov 2025 12:02:12 +0100 Subject: [PATCH] media: mali-c55: Assert ISP blocks size correctness 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 Reviewed-by: Laurent Pinchart Reviewed-by: Sakari Ailus Signed-off-by: Hans Verkuil --- drivers/media/platform/arm/mali-c55/mali-c55-params.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/platform/arm/mali-c55/mali-c55-params.c b/drivers/media/platform/arm/mali-c55/mali-c55-params.c index c643cd013e468..082cda4f4f63e 100644 --- a/drivers/media/platform/arm/mali-c55/mali-c55-params.c +++ b/drivers/media/platform/arm/mali-c55/mali-c55-params.c @@ -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) { -- 2.47.3