git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/ice/base: support extended GPIO access
[dpdk.git]
/
drivers
/
net
/
ice
/
base
/
ice_bitops.h
diff --git
a/drivers/net/ice/base/ice_bitops.h
b/drivers/net/ice/base/ice_bitops.h
index
a56d554
..
3954896
100644
(file)
--- a/
drivers/net/ice/base/ice_bitops.h
+++ b/
drivers/net/ice/base/ice_bitops.h
@@
-346,6
+346,11
@@
static inline u16 ice_find_first_bit(const ice_bitmap_t *bitmap, u16 size)
return ice_find_next_bit(bitmap, size, 0);
}
return ice_find_next_bit(bitmap, size, 0);
}
+#define ice_for_each_set_bit(_bitpos, _addr, _maxlen) \
+ for ((_bitpos) = ice_find_first_bit((_addr), (_maxlen)); \
+ (_bitpos) < (_maxlen); \
+ (_bitpos) = ice_find_next_bit((_addr), (_maxlen), (_bitpos) + 1))
+
/**
* ice_is_any_bit_set - Return true of any bit in the bitmap is set
* @bitmap: the bitmap to check
/**
* ice_is_any_bit_set - Return true of any bit in the bitmap is set
* @bitmap: the bitmap to check
@@
-390,7
+395,7
@@
ice_bitmap_set(ice_bitmap_t *dst, u16 pos, u16 num_bits)
{
u16 i;
{
u16 i;
- for (i = pos; i < num_bits; i++)
+ for (i = pos; i <
pos +
num_bits; i++)
ice_set_bit(i, dst);
}
ice_set_bit(i, dst);
}