Skip to content

Commit 1435db4

Browse files
Jacopo MondiHans Verkuil
authored andcommitted
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 <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>
1 parent d619dd9 commit 1435db4

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/media/platform/arm/mali-c55/mali-c55-params.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,9 @@ mali_c55_params_block_types_info[] = {
465465
},
466466
};
467467

468+
static_assert(ARRAY_SIZE(mali_c55_params_handlers) ==
469+
ARRAY_SIZE(mali_c55_params_block_types_info));
470+
468471
static int mali_c55_params_enum_fmt_meta_out(struct file *file, void *fh,
469472
struct v4l2_fmtdesc *f)
470473
{

0 commit comments

Comments
 (0)