diff options
| author | Bruce Allan <bruce.w.allan@intel.com> | 2018-10-26 14:44:42 -0400 |
|---|---|---|
| committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2018-11-20 14:39:04 -0500 |
| commit | 55aa141ed909711939ee4546b85d09d2f2894532 (patch) | |
| tree | fd40a57d2d2a62744de6b9f1400b5a592b89e1f4 /drivers/net/ethernet/intel | |
| parent | 6a7e69936992104e7abbf12c7f619a39bf139a48 (diff) | |
ice: Constify global structures that can/should be
Indicate these structs should not be modified and take advantage of some
compiler optimizations by making these structs const.
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel')
| -rw-r--r-- | drivers/net/ethernet/intel/ice/ice_ethtool.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c index 4d3e3113741d..990d660f527a 100644 --- a/drivers/net/ethernet/intel/ice/ice_ethtool.c +++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c | |||
| @@ -62,7 +62,7 @@ static const struct ice_stats ice_gstrings_vsi_stats[] = { | |||
| 62 | * The PF_STATs are appended to the netdev stats only when ethtool -S | 62 | * The PF_STATs are appended to the netdev stats only when ethtool -S |
| 63 | * is queried on the base PF netdev. | 63 | * is queried on the base PF netdev. |
| 64 | */ | 64 | */ |
| 65 | static struct ice_stats ice_gstrings_pf_stats[] = { | 65 | static const struct ice_stats ice_gstrings_pf_stats[] = { |
| 66 | ICE_PF_STAT("tx_bytes", stats.eth.tx_bytes), | 66 | ICE_PF_STAT("tx_bytes", stats.eth.tx_bytes), |
| 67 | ICE_PF_STAT("rx_bytes", stats.eth.rx_bytes), | 67 | ICE_PF_STAT("rx_bytes", stats.eth.rx_bytes), |
| 68 | ICE_PF_STAT("tx_unicast", stats.eth.tx_unicast), | 68 | ICE_PF_STAT("tx_unicast", stats.eth.tx_unicast), |
| @@ -104,7 +104,7 @@ static struct ice_stats ice_gstrings_pf_stats[] = { | |||
| 104 | ICE_PF_STAT("mac_remote_faults", stats.mac_remote_faults), | 104 | ICE_PF_STAT("mac_remote_faults", stats.mac_remote_faults), |
| 105 | }; | 105 | }; |
| 106 | 106 | ||
| 107 | static u32 ice_regs_dump_list[] = { | 107 | static const u32 ice_regs_dump_list[] = { |
| 108 | PFGEN_STATE, | 108 | PFGEN_STATE, |
| 109 | PRTGEN_STATUS, | 109 | PRTGEN_STATUS, |
| 110 | QRX_CTRL(0), | 110 | QRX_CTRL(0), |
