Re: [PATCH v5] media: atomisp: pci: Replace bytes macros with functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 18, 2023 at 5:17 PM Brent Pappas <bpappas@xxxxxxxxxxxxxxx> wrote:
>
> Replace the function-like macros FPNTBL_BYTES(), SCTBL_BYTES(), and
> MORPH_PLANE_BYTES() with functions to comply with Linux coding style
> standards.
> Replace multiplication with calls to array_size() and array3_size()
> to prevent accidental arithmetic overflow.

...

> +static size_t sctbl_bytes(const struct ia_css_binary *binary)
> +{
> +       return array_size(sizeof(unsigned short),

I would use size_mul() here, but either would work.

> +                                         array3_size(binary->sctbl_height,
> +                                                     binary->sctbl_aligned_width_per_color,
> +                                                                 IA_CSS_SC_NUM_COLORS));
> +}

...

Please, fix indentations and patch will be good enough, thank you!

-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux