From d647871c50ab3ac7dffc0b13959491027b210659 Mon Sep 17 00:00:00 2001 From: Simei Su Date: Tue, 20 Oct 2020 16:46:39 +0800 Subject: [PATCH] net/ice/base: fix bitmap set function This patch corrects an upper limit value in for loop. Fixes: dd4a3cef556a ("net/ice/base: introduce and use bitmap set API") Cc: stable@dpdk.org Signed-off-by: Simei Su Acked-by: Qi Zhang --- drivers/net/ice/base/ice_bitops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ice/base/ice_bitops.h b/drivers/net/ice/base/ice_bitops.h index f954a74364..39548967cc 100644 --- a/drivers/net/ice/base/ice_bitops.h +++ b/drivers/net/ice/base/ice_bitops.h @@ -395,7 +395,7 @@ ice_bitmap_set(ice_bitmap_t *dst, u16 pos, u16 num_bits) { u16 i; - for (i = pos; i < num_bits; i++) + for (i = pos; i < pos + num_bits; i++) ice_set_bit(i, dst); } -- 2.20.1