[PATCH v3 014/129] net/ice/base: refactor (non) bitmap declarations

Anatoly Burakov anatoly.burakov at intel.com
Tue Jun 25 13:12:19 CEST 2024


From: Jesse Brandeburg <jesse.brandeburg at intel.com>

The firmware interface definition file mistakenly started using bitmap
declarations for its storage in a couple of structures. The data structure
contains a "bit-map" of bits that the hardware/firmware sets or reads but it's
not a DECLARE_BITMAP style bitmap and it's not accessed with the
set_bit/clear_bit operators, so stop declaring them that way.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg at intel.com>
Signed-off-by: Ian Stokes <ian.stokes at intel.com>
---
 drivers/net/ice/base/ice_adminq_cmd.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/base/ice_adminq_cmd.h b/drivers/net/ice/base/ice_adminq_cmd.h
index 56c9a4813e..3decaee546 100644
--- a/drivers/net/ice/base/ice_adminq_cmd.h
+++ b/drivers/net/ice/base/ice_adminq_cmd.h
@@ -796,7 +796,7 @@ struct ice_aqc_recipe_data_elem {
 struct ice_aqc_recipe_to_profile {
 	__le16 profile_id;
 	u8 rsvd[6];
-	ice_declare_bitmap(recipe_assoc, ICE_MAX_NUM_RECIPES);
+	u8 recipe_assoc[DIVIDE_AND_ROUND_UP(ICE_MAX_NUM_RECIPES, BITS_PER_BYTE)];
 };
 
 /* Add/Update/Remove/Get switch rules (indirect 0x02A0, 0x02A1, 0x02A2, 0x02A3)
@@ -972,7 +972,7 @@ struct ice_sw_rule_vsi_list {
 /* Query VSI list command/response entry */
 struct ice_sw_rule_vsi_list_query {
 	__le16 index;
-	ice_declare_bitmap(vsi_list, ICE_MAX_VSI);
+	u8 vsi_list[DIVIDE_AND_ROUND_UP(ICE_MAX_VSI, BITS_PER_BYTE)];
 };
 #pragma pack()
 
-- 
2.43.0



More information about the dev mailing list