Re: [PATCH v7 14/16] media: atomisp: Use struct v4l2_area for padding
From: Andy Shevchenko
Date: Thu Sep 03 2026 - 03:19:25 EST
On Wed, Sep 02, 2026 at 04:53:43PM +0200, Maurizio Casciano wrote:
> The padding helper passes width and height as four separate scalar
> arguments even though they form two logical dimensions.
>
> Pass the requested size and returned padding as struct v4l2_area values.
> This makes the dimensions explicit and simplifies all three callers.
See v6 review comments and add my tag.
...
> +static inline void
Since it's not in the header, we can drop 'inline', so it becomes
> +atomisp_get_pix_padding(struct atomisp_device *isp,
> + struct v4l2_pix_format *f,
> + struct v4l2_area *pad)
static void atomisp_get_pix_padding(struct atomisp_device *isp,
struct v4l2_pix_format *f,
struct v4l2_area *pad)
> +{
> + struct v4l2_area size = { .width = f->width, .height = f->height };
> +
> + atomisp_get_padding(isp, size, pad);
> }
--
With Best Regards,
Andy Shevchenko