diff mbox series

[v2,64/70] net/ice/base: convert 1588 structs to use bitfields

Message ID 20220815073206.2917968-65-qi.z.zhang@intel.com (mailing list archive)
State Awaiting Upstream
Delegated to: Qi Zhang
Headers show
Series ice base code update | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Zhang, Qi Z Aug. 15, 2022, 7:32 a.m. UTC
Use bitfields in 1588 structs so they don't waste too much space.

Signed-off-by: Karol Kolacinski <karol.kolacinski@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/base/ice_type.h | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/ice/base/ice_type.h b/drivers/net/ice/base/ice_type.h
index 6d0adf0dd1..043dae7781 100644
--- a/drivers/net/ice/base/ice_type.h
+++ b/drivers/net/ice/base/ice_type.h
@@ -662,12 +662,12 @@  struct ice_ts_func_info {
 	/* Function specific info */
 	enum ice_time_ref_freq time_ref;
 	u8 clk_freq;
-	u8 clk_src;
-	u8 tmr_index_assoc;
-	u8 ena;
-	u8 tmr_index_owned;
-	u8 src_tmr_owned;
-	u8 tmr_ena;
+	u8 clk_src : 1;
+	u8 tmr_index_assoc : 1;
+	u8 ena : 1;
+	u8 tmr_index_owned : 1;
+	u8 src_tmr_owned : 1;
+	u8 tmr_ena : 1;
 };
 
 /* Device specific definitions */
@@ -685,14 +685,14 @@  struct ice_ts_dev_info {
 	/* Device specific info */
 	u32 ena_ports;
 	u32 tmr_own_map;
-	u32 tmr0_owner;
-	u32 tmr1_owner;
-	u8 tmr0_owned;
-	u8 tmr1_owned;
-	u8 ena;
-	u8 tmr0_ena;
-	u8 tmr1_ena;
-	u8 ts_ll_read;
+	u8 tmr0_owner;
+	u8 tmr1_owner;
+	u8 tmr0_owned : 1;
+	u8 tmr1_owned : 1;
+	u8 ena : 1;
+	u8 tmr0_ena : 1;
+	u8 tmr1_ena : 1;
+	u8 ts_ll_read : 1;
 };
 
 /* Function specific capabilities */