[PATCH v6 4/5] net: wan: fsl_qmc_hdlc: Add runtime timeslots changes support

Andy Shevchenko andriy.shevchenko at linux.intel.com
Thu Mar 7 00:43:04 AEDT 2024


On Wed, Mar 06, 2024 at 05:06:12AM -0800, Yury Norov wrote:
> On Wed, Mar 06, 2024 at 09:07:20AM +0100, Herve Codina wrote:

...

> > +	DECLARE_BITMAP(ts_mask_avail, 64);
> > +	DECLARE_BITMAP(ts_mask, 64);
> > +	DECLARE_BITMAP(map, 64);


> > +	bitmap_from_u64(ts_mask_avail, ts_info->rx_ts_mask_avail);
> > +	bitmap_from_u64(map, slot_map);

> We've got a BITMAP_FROM_U64() for this:
> 
> 	DECLARE_BITMAP(ts_mask_avail, 64) = { BITMAP_FROM_U64(ts_info->rx_ts_mask_avail) };
> 	DECLARE_BITMAP(map, 64) = { BITMAP_FROM_U64(slot_map) };

This looks ugly. Can we rather provide a macro that does this under the hood?

Roughly:

#define DEFINE_BITMAP_64(name, src)				\
	DECLARE_BITMAP(name, 64) = { BITMAP_FROM_U64(src) }

-- 
With Best Regards,
Andy Shevchenko




More information about the Linuxppc-dev mailing list