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