From: Simei Su Date: Tue, 20 Oct 2020 08:46:39 +0000 (+0800) Subject: net/ice/base: fix bitmap set function X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=d647871c50ab3ac7dffc0b13959491027b210659;p=dpdk.git 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 --- 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); }