lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VcxvPZOZpGMSQXkCFv+WekHckMJkympfdR0ih72AjjkNw@mail.gmail.com>
Date:   Wed, 18 Jan 2023 17:53:45 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Brent Pappas <bpappas@...pasbrent.com>
Cc:     error27@...il.com, ailus@...ux.intel.com,
        gregkh@...uxfoundation.org, hdegoede@...hat.com,
        linux-kernel@...r.kernel.org, linux-media@...r.kernel.org,
        linux-staging@...ts.linux.dev, mchehab@...nel.org
Subject: Re: [PATCH v5] media: atomisp: pci: Replace bytes macros with functions

On Wed, Jan 18, 2023 at 5:17 PM Brent Pappas <bpappas@...pasbrent.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ