lkml.org 
[lkml]   [2023]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v5] media: atomisp: pci: Replace bytes macros with functions
On Wed, Jan 18, 2023 at 5:17 PM Brent Pappas <bpappas@pappasbrent.com> 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

\
 
 \ /
  Last update: 2023-03-26 23:46    [W:0.093 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site