[PATCH v2 1/3] event/opdl: fix non-constant compile time assertion

Bruce Richardson bruce.richardson at intel.com
Mon Nov 13 18:10:40 CET 2023


On Mon, Nov 13, 2023 at 09:06:03AM -0800, Stephen Hemminger wrote:
> RTE_BUILD_BUG_ON() was being used with a non-constant value.
> The inline function rte_is_power_of_2() is not constant since
> inline expansion happens later in the compile process.
> Replace it with macro which will be constant.
> 
> Fixes: 4236ce9bf5bf ("event/opdl: add OPDL ring infrastructure library")
> Cc: liang.j.ma at intel.com
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
> ---
>  drivers/event/opdl/opdl_ring.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

Acked-by: Bruce Richardson <bruce.richardson at intel.com>


More information about the dev mailing list