[PATCH 4/5] net/nfp: fix integer shift problem
Chaoyong He
chaoyong.he at corigine.com
Wed Nov 15 04:23:09 CET 2023
CI found integer handling issues, bad shift.
Coverity issue: 385412
Fixes: e6858e7e7cd3 ("net/nfp: move shared target logic to own file")
Cc: stable at dpdk.org
Signed-off-by: Chaoyong He <chaoyong.he at corigine.com>
Reviewed-by: Long Wu <long.wu at corigine.com>
Reviewed-by: Peng Zhang <peng.zhang at corigine.com>
---
drivers/net/nfp/nfpcore/nfp_target.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/nfp/nfpcore/nfp_target.c b/drivers/net/nfp/nfpcore/nfp_target.c
index ecb45f7928..ea5b39a4b9 100644
--- a/drivers/net/nfp/nfpcore/nfp_target.c
+++ b/drivers/net/nfp/nfpcore/nfp_target.c
@@ -528,7 +528,7 @@ nfp_mask64(int msb,
return 0;
width = msb - lsb + 1;
- if (width < 0)
+ if (width <= 0)
return 0;
if (width == 64)
--
2.39.1
More information about the stable
mailing list