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

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

 



On Mon, Jan 23, 2023 at 08:27:37PM +0200, Andy Shevchenko wrote:
> On Mon, Jan 23, 2023 at 01:52:04PM +0100, Hans de Goede wrote:
> > From: Brent Pappas <bpappas@xxxxxxxxxxxxxxx>
> > 
> > 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)

Note, with such conversion done you may kill these macros and use GENMASK()
inline.

-- 
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