Re: [PATCH 56/57] media: atomisp: pci: hive_isp_css_common: host: vmem: Replace SUBWORD macros with functions

Andy Shevchenko
2023-01-23T18:30:36Z

On Mon, Jan 23, 2023 at 01:52:04PM +0100, Hans de Goede wrote:
> From: Brent Pappas <bpappas@pappasbrent.com>
>
> Replace the macros SUBWORD() and INV_SUBWORD() with functions to comply
> with Linux coding style standards.

...

> +static inline hive_uedge
> +subword(hive_uedge w, unsigned int start, unsigned int end)
> +{
> + return (w & (((1ULL << (end - 1)) - 1) << 1 | 1)) >> start;
> +}

...

> +static inline hive_uedge
> +inv_subword(hive_uedge w, unsigned int start, unsigned int end)
> +{
> + return w & (~(((1ULL << (end - 1)) - 1) << 1 | 1) | ((1ULL << start) - 1));
> +}

...

Brent, maybe you can look at these deeply and convert them to use GENMASK()
instead? (It can be done as a followup patch, this one is fine)

--
With Best Regards,
Andy Shevchenko