[PATCH] bitops: improve power of 2 alignment function documentation
Thomas Monjalon
thomas at monjalon.net
Thu Oct 23 19:25:58 CEST 2025
> > > In the documentation, make clear
> > > rte_align(32|64)prevpow2(<n>) -> <n>, provided <n> is a power of 2.
> > >
> > > The original documentation stated the "previous" power of 2 would be
> > > returned, potentially leaving the user to erroneously conclude that,
> > > for example, rte_align32prevpow2(32) -> 16.
> > >
> > > The rte_align(32|64)pow2(<n>) documentation, suffering from a similar
> > > issue, is reworded in the same manner.
> > >
> > > Fixes: 08f683174e94 ("eal: add functions for previous power of 2
> > alignment")
> > > Cc: stable at dpdk.org
> > >
> > > Signed-off-by: Mattias Rönnblom <mattias.ronnblom at ericsson.com>
> > > ---
> > Much clearer, thanks.
> >
> > Acked-by: Bruce Richardson <bruce.richardson at intel.com>
>
> Acked-by: Morten Brørup <mb at smartsharesystems.com>
Applied, thanks.
More information about the dev
mailing list