Commit 43f8b224 authored by Bruce Allan's avatar Bruce Allan Committed by Jeff Kirsher

ice: Change struct members from bool to u8

Recent versions of checkpatch have a new warning based on a documented
preference of Linus to not use bool in structures due to wasted space and
the size of bool is implementation dependent.  For more information, see
the email thread at https://lkml.org/lkml/2017/11/21/384.
Signed-off-by: default avatarBruce Allan <bruce.w.allan@intel.com>
Signed-off-by: default avatarAnirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: default avatarTony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent dab0588f
...@@ -196,9 +196,9 @@ struct ice_vsi { ...@@ -196,9 +196,9 @@ struct ice_vsi {
struct list_head tmp_sync_list; /* MAC filters to be synced */ struct list_head tmp_sync_list; /* MAC filters to be synced */
struct list_head tmp_unsync_list; /* MAC filters to be unsynced */ struct list_head tmp_unsync_list; /* MAC filters to be unsynced */
bool irqs_ready; u8 irqs_ready;
bool current_isup; /* Sync 'link up' logging */ u8 current_isup; /* Sync 'link up' logging */
bool stat_offsets_loaded; u8 stat_offsets_loaded;
/* queue information */ /* queue information */
u8 tx_mapping_mode; /* ICE_MAP_MODE_[CONTIG|SCATTER] */ u8 tx_mapping_mode; /* ICE_MAP_MODE_[CONTIG|SCATTER] */
...@@ -269,7 +269,7 @@ struct ice_pf { ...@@ -269,7 +269,7 @@ struct ice_pf {
struct ice_hw_port_stats stats; struct ice_hw_port_stats stats;
struct ice_hw_port_stats stats_prev; struct ice_hw_port_stats stats_prev;
struct ice_hw hw; struct ice_hw hw;
bool stat_prev_loaded; /* has previous stats been loaded */ u8 stat_prev_loaded; /* has previous stats been loaded */
char int_name[ICE_INT_NAME_STR_LEN]; char int_name[ICE_INT_NAME_STR_LEN];
}; };
......
...@@ -17,7 +17,7 @@ struct ice_vsi_ctx { ...@@ -17,7 +17,7 @@ struct ice_vsi_ctx {
u16 vsis_unallocated; u16 vsis_unallocated;
u16 flags; u16 flags;
struct ice_aqc_vsi_props info; struct ice_aqc_vsi_props info;
bool alloc_from_pool; u8 alloc_from_pool;
}; };
enum ice_sw_fwd_act_type { enum ice_sw_fwd_act_type {
...@@ -94,8 +94,8 @@ struct ice_fltr_info { ...@@ -94,8 +94,8 @@ struct ice_fltr_info {
u8 qgrp_size; u8 qgrp_size;
/* Rule creations populate these indicators basing on the switch type */ /* Rule creations populate these indicators basing on the switch type */
bool lb_en; /* Indicate if packet can be looped back */ u8 lb_en; /* Indicate if packet can be looped back */
bool lan_en; /* Indicate if packet can be forwarded to the uplink */ u8 lan_en; /* Indicate if packet can be forwarded to the uplink */
}; };
/* Bookkeeping structure to hold bitmap of VSIs corresponding to VSI list id */ /* Bookkeeping structure to hold bitmap of VSIs corresponding to VSI list id */
......
...@@ -143,7 +143,7 @@ struct ice_ring { ...@@ -143,7 +143,7 @@ struct ice_ring {
u16 next_to_use; u16 next_to_use;
u16 next_to_clean; u16 next_to_clean;
bool ring_active; /* is ring online or not */ u8 ring_active; /* is ring online or not */
/* stats structs */ /* stats structs */
struct ice_q_stats stats; struct ice_q_stats stats;
......
...@@ -83,7 +83,7 @@ struct ice_link_status { ...@@ -83,7 +83,7 @@ struct ice_link_status {
u64 phy_type_low; u64 phy_type_low;
u16 max_frame_size; u16 max_frame_size;
u16 link_speed; u16 link_speed;
bool lse_ena; /* Link Status Event notification */ u8 lse_ena; /* Link Status Event notification */
u8 link_info; u8 link_info;
u8 an_info; u8 an_info;
u8 ext_info; u8 ext_info;
...@@ -101,7 +101,7 @@ struct ice_phy_info { ...@@ -101,7 +101,7 @@ struct ice_phy_info {
struct ice_link_status link_info_old; struct ice_link_status link_info_old;
u64 phy_type_low; u64 phy_type_low;
enum ice_media_type media_type; enum ice_media_type media_type;
bool get_link_info; u8 get_link_info;
}; };
/* Common HW capabilities for SW use */ /* Common HW capabilities for SW use */
...@@ -167,7 +167,7 @@ struct ice_nvm_info { ...@@ -167,7 +167,7 @@ struct ice_nvm_info {
u32 oem_ver; /* OEM version info */ u32 oem_ver; /* OEM version info */
u16 sr_words; /* Shadow RAM size in words */ u16 sr_words; /* Shadow RAM size in words */
u16 ver; /* NVM package version */ u16 ver; /* NVM package version */
bool blank_nvm_mode; /* is NVM empty (no FW present) */ u8 blank_nvm_mode; /* is NVM empty (no FW present) */
}; };
/* Max number of port to queue branches w.r.t topology */ /* Max number of port to queue branches w.r.t topology */
...@@ -181,7 +181,7 @@ struct ice_sched_node { ...@@ -181,7 +181,7 @@ struct ice_sched_node {
struct ice_aqc_txsched_elem_data info; struct ice_aqc_txsched_elem_data info;
u32 agg_id; /* aggregator group id */ u32 agg_id; /* aggregator group id */
u16 vsi_id; u16 vsi_id;
bool in_use; /* suspended or in use */ u8 in_use; /* suspended or in use */
u8 tx_sched_layer; /* Logical Layer (1-9) */ u8 tx_sched_layer; /* Logical Layer (1-9) */
u8 num_children; u8 num_children;
u8 tc_num; u8 tc_num;
...@@ -218,7 +218,7 @@ struct ice_sched_vsi_info { ...@@ -218,7 +218,7 @@ struct ice_sched_vsi_info {
struct ice_sched_tx_policy { struct ice_sched_tx_policy {
u16 max_num_vsis; u16 max_num_vsis;
u8 max_num_lan_qs_per_tc[ICE_MAX_TRAFFIC_CLASS]; u8 max_num_lan_qs_per_tc[ICE_MAX_TRAFFIC_CLASS];
bool rdma_ena; u8 rdma_ena;
}; };
struct ice_port_info { struct ice_port_info {
...@@ -243,7 +243,7 @@ struct ice_port_info { ...@@ -243,7 +243,7 @@ struct ice_port_info {
struct list_head agg_list; /* lists all aggregator */ struct list_head agg_list; /* lists all aggregator */
u8 lport; u8 lport;
#define ICE_LPORT_MASK 0xff #define ICE_LPORT_MASK 0xff
bool is_vf; u8 is_vf;
}; };
struct ice_switch_info { struct ice_switch_info {
...@@ -287,7 +287,7 @@ struct ice_hw { ...@@ -287,7 +287,7 @@ struct ice_hw {
u8 max_cgds; u8 max_cgds;
u8 sw_entry_point_layer; u8 sw_entry_point_layer;
bool evb_veb; /* true for VEB, false for VEPA */ u8 evb_veb; /* true for VEB, false for VEPA */
struct ice_bus_info bus; struct ice_bus_info bus;
struct ice_nvm_info nvm; struct ice_nvm_info nvm;
struct ice_hw_dev_caps dev_caps; /* device capabilities */ struct ice_hw_dev_caps dev_caps; /* device capabilities */
...@@ -318,7 +318,7 @@ struct ice_hw { ...@@ -318,7 +318,7 @@ struct ice_hw {
u8 itr_gran_100; u8 itr_gran_100;
u8 itr_gran_50; u8 itr_gran_50;
u8 itr_gran_25; u8 itr_gran_25;
bool ucast_shared; /* true if VSIs can share unicast addr */ u8 ucast_shared; /* true if VSIs can share unicast addr */
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment