[PATCH iwl-next 4/10] ice: reorder ice_flash_info fields to eliminate padding

Aleksandr Loktionov
2026-04-10T07:49:30Z

From: Jacob Keller <jacob.e.keller@intel.com>

The ice_flash_info structure has a u16 sr_words field before a u32
flash_size value. This creates a 2-byte hole as well as 3 bytes of
padding at the end of the structure due to the blank_nvm_mode bitfield.

Re-order the structure to place flash_size first, which gives a better
layout and reduces padding.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
---
drivers/net/ethernet/intel/ice/ice_type.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_type.h b/drivers/net/ethernet/intel/ice/ice_type.h
index cb47127..97bf601 100644
--- a/drivers/net/ethernet/intel/ice/ice_type.h
+++ b/drivers/net/ethernet/intel/ice/ice_type.h
@@ -968,8 +968,8 @@ struct ice_flash_info {
struct ice_nvm_info nvm; /* NVM version information */
struct ice_netlist_info netlist;/* Netlist version info */
struct ice_bank_info banks; /* Flash Bank information */
- u16 sr_words; /* Shadow RAM size in words */
u32 flash_size; /* Size of available flash in bytes */
+ u16 sr_words; /* Shadow RAM size in words */
u8 blank_nvm_mode; /* is NVM empty (no FW present) */
};

--
2.52.0