From c4cccb444a68fea3af85e5c265ad7f97a7c703a6 Mon Sep 17 00:00:00 2001 From: Ting Xu Date: Mon, 6 Feb 2023 03:01:10 +0000 Subject: avf: fix bit calculation function fls_u32 In avf the function fls_u32 is used to calculate the power of 2. Fix the expression of this function. Type: fix Signed-off-by: Ting Xu Change-Id: I27160de8588a5efb3f24306597a5a240deb3ab74 (cherry picked from commit dc95634a237419433b8189bf41b3968640b1f97e) --- src/plugins/avf/avf_fdir_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/avf/avf_fdir_lib.c b/src/plugins/avf/avf_fdir_lib.c index efb67cb4b17..52937874186 100644 --- a/src/plugins/avf/avf_fdir_lib.c +++ b/src/plugins/avf/avf_fdir_lib.c @@ -28,7 +28,7 @@ static inline int fls_u32 (u32 x) { - return (x == 0) ? 0 : 32 - count_leading_zeros (x); + return (x == 0) ? 0 : 64 - count_leading_zeros (x); } static inline int -- cgit 1.2.3-korg