From: Jacopo Mondi Date: Fri, 14 Nov 2025 11:02:12 +0000 (+0100) Subject: media: mali-c55: Assert ISP blocks size correctness X-Git-Tag: v6.19-rc1~159^2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1435db44ec1c81ede88470ed3486a2f5a8765704;p=thirdparty%2Flinux.git 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 --- 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) {