net/ice/base: fix bitmap set function
authorSimei Su <simei.su@intel.com>
Tue, 20 Oct 2020 08:46:39 +0000 (16:46 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 3 Nov 2020 22:24:24 +0000 (23:24 +0100)
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 <simei.su@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/ice/base/ice_bitops.h

index f954a74..3954896 100644 (file)
@@ -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);
 }