i40e: fix whitespace issues in i40e_ethtool.c

There's a number of minor incidental whitespace issues in this file.
This addresses most of the ones I could find.

Signed-off-by: Alan Brady <alan.brady@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
Alan Brady 2017-10-05 14:53:37 -07:00 committed by Jeff Kirsher
parent 91a5c44722
commit a03af69f5c

View File

@ -511,7 +511,8 @@ static void i40e_get_settings_link_up(struct i40e_hw *hw,
break; break;
default: default:
/* if we got here and link is up something bad is afoot */ /* if we got here and link is up something bad is afoot */
netdev_info(netdev, "WARNING: Link is up but PHY type 0x%x is not recognized.\n", netdev_info(netdev,
"WARNING: Link is up but PHY type 0x%x is not recognized.\n",
hw_link_info->phy_type); hw_link_info->phy_type);
} }
@ -614,14 +615,12 @@ static int i40e_get_link_ksettings(struct net_device *netdev,
ks->base.autoneg = ((hw_link_info->an_info & I40E_AQ_AN_COMPLETED) ? ks->base.autoneg = ((hw_link_info->an_info & I40E_AQ_AN_COMPLETED) ?
AUTONEG_ENABLE : AUTONEG_DISABLE); AUTONEG_ENABLE : AUTONEG_DISABLE);
/* Set media type settings */
switch (hw->phy.media_type) { switch (hw->phy.media_type) {
case I40E_MEDIA_TYPE_BACKPLANE: case I40E_MEDIA_TYPE_BACKPLANE:
ethtool_link_ksettings_add_link_mode(ks, supported, ethtool_link_ksettings_add_link_mode(ks, supported, Autoneg);
Autoneg); ethtool_link_ksettings_add_link_mode(ks, supported, Backplane);
ethtool_link_ksettings_add_link_mode(ks, supported, ethtool_link_ksettings_add_link_mode(ks, advertising, Autoneg);
Backplane);
ethtool_link_ksettings_add_link_mode(ks, advertising,
Autoneg);
ethtool_link_ksettings_add_link_mode(ks, advertising, ethtool_link_ksettings_add_link_mode(ks, advertising,
Backplane); Backplane);
ks->base.port = PORT_NONE; ks->base.port = PORT_NONE;
@ -652,16 +651,14 @@ static int i40e_get_link_ksettings(struct net_device *netdev,
switch (hw->fc.requested_mode) { switch (hw->fc.requested_mode) {
case I40E_FC_FULL: case I40E_FC_FULL:
ethtool_link_ksettings_add_link_mode(ks, advertising, ethtool_link_ksettings_add_link_mode(ks, advertising, Pause);
Pause);
break; break;
case I40E_FC_TX_PAUSE: case I40E_FC_TX_PAUSE:
ethtool_link_ksettings_add_link_mode(ks, advertising, ethtool_link_ksettings_add_link_mode(ks, advertising,
Asym_Pause); Asym_Pause);
break; break;
case I40E_FC_RX_PAUSE: case I40E_FC_RX_PAUSE:
ethtool_link_ksettings_add_link_mode(ks, advertising, ethtool_link_ksettings_add_link_mode(ks, advertising, Pause);
Pause);
ethtool_link_ksettings_add_link_mode(ks, advertising, ethtool_link_ksettings_add_link_mode(ks, advertising,
Asym_Pause); Asym_Pause);
break; break;
@ -708,17 +705,14 @@ static int i40e_set_link_ksettings(struct net_device *netdev,
i40e_partition_setting_complaint(pf); i40e_partition_setting_complaint(pf);
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
if (vsi != pf->vsi[pf->lan_vsi]) if (vsi != pf->vsi[pf->lan_vsi])
return -EOPNOTSUPP; return -EOPNOTSUPP;
if (hw->phy.media_type != I40E_MEDIA_TYPE_BASET && if (hw->phy.media_type != I40E_MEDIA_TYPE_BASET &&
hw->phy.media_type != I40E_MEDIA_TYPE_FIBER && hw->phy.media_type != I40E_MEDIA_TYPE_FIBER &&
hw->phy.media_type != I40E_MEDIA_TYPE_BACKPLANE && hw->phy.media_type != I40E_MEDIA_TYPE_BACKPLANE &&
hw->phy.media_type != I40E_MEDIA_TYPE_DA && hw->phy.media_type != I40E_MEDIA_TYPE_DA &&
hw->phy.link_info.link_info & I40E_AQ_LINK_UP) hw->phy.link_info.link_info & I40E_AQ_LINK_UP)
return -EOPNOTSUPP; return -EOPNOTSUPP;
if (hw->device_id == I40E_DEV_ID_KX_B || if (hw->device_id == I40E_DEV_ID_KX_B ||
hw->device_id == I40E_DEV_ID_KX_C || hw->device_id == I40E_DEV_ID_KX_C ||
hw->device_id == I40E_DEV_ID_20G_KR2 || hw->device_id == I40E_DEV_ID_20G_KR2 ||
@ -844,7 +838,6 @@ static int i40e_set_link_ksettings(struct net_device *netdev,
*/ */
if (!config.link_speed) if (!config.link_speed)
config.link_speed = abilities.link_speed; config.link_speed = abilities.link_speed;
if (change || (abilities.link_speed != config.link_speed)) { if (change || (abilities.link_speed != config.link_speed)) {
/* copy over the rest of the abilities */ /* copy over the rest of the abilities */
config.phy_type = abilities.phy_type; config.phy_type = abilities.phy_type;
@ -872,7 +865,8 @@ static int i40e_set_link_ksettings(struct net_device *netdev,
/* make the aq call */ /* make the aq call */
status = i40e_aq_set_phy_config(hw, &config, NULL); status = i40e_aq_set_phy_config(hw, &config, NULL);
if (status) { if (status) {
netdev_info(netdev, "Set phy config failed, err %s aq_err %s\n", netdev_info(netdev,
"Set phy config failed, err %s aq_err %s\n",
i40e_stat_str(hw, status), i40e_stat_str(hw, status),
i40e_aq_str(hw, hw->aq.asq_last_status)); i40e_aq_str(hw, hw->aq.asq_last_status));
err = -EAGAIN; err = -EAGAIN;
@ -881,7 +875,8 @@ static int i40e_set_link_ksettings(struct net_device *netdev,
status = i40e_update_link_info(hw); status = i40e_update_link_info(hw);
if (status) if (status)
netdev_dbg(netdev, "Updating link info failed with err %s aq_err %s\n", netdev_dbg(netdev,
"Updating link info failed with err %s aq_err %s\n",
i40e_stat_str(hw, status), i40e_stat_str(hw, status),
i40e_aq_str(hw, hw->aq.asq_last_status)); i40e_aq_str(hw, hw->aq.asq_last_status));
@ -2072,14 +2067,13 @@ static int __i40e_get_coalesce(struct net_device *netdev,
ec->tx_max_coalesced_frames_irq = vsi->work_limit; ec->tx_max_coalesced_frames_irq = vsi->work_limit;
ec->rx_max_coalesced_frames_irq = vsi->work_limit; ec->rx_max_coalesced_frames_irq = vsi->work_limit;
/* rx and tx usecs has per queue value. If user doesn't specify the queue, /* rx and tx usecs has per queue value. If user doesn't specify the
* return queue 0's value to represent. * queue, return queue 0's value to represent.
*/ */
if (queue < 0) { if (queue < 0)
queue = 0; queue = 0;
} else if (queue >= vsi->num_queue_pairs) { else if (queue >= vsi->num_queue_pairs)
return -EINVAL; return -EINVAL;
}
rx_ring = vsi->rx_rings[queue]; rx_ring = vsi->rx_rings[queue];
tx_ring = vsi->tx_rings[queue]; tx_ring = vsi->tx_rings[queue];
@ -2093,7 +2087,6 @@ static int __i40e_get_coalesce(struct net_device *netdev,
ec->rx_coalesce_usecs = rx_ring->rx_itr_setting & ~I40E_ITR_DYNAMIC; ec->rx_coalesce_usecs = rx_ring->rx_itr_setting & ~I40E_ITR_DYNAMIC;
ec->tx_coalesce_usecs = tx_ring->tx_itr_setting & ~I40E_ITR_DYNAMIC; ec->tx_coalesce_usecs = tx_ring->tx_itr_setting & ~I40E_ITR_DYNAMIC;
/* we use the _usecs_high to store/set the interrupt rate limit /* we use the _usecs_high to store/set the interrupt rate limit
* that the hardware supports, that almost but not quite * that the hardware supports, that almost but not quite
* fits the original intent of the ethtool variable, * fits the original intent of the ethtool variable,
@ -2143,7 +2136,6 @@ static int i40e_get_per_queue_coalesce(struct net_device *netdev, u32 queue,
* *
* Change the ITR settings for a specific queue. * Change the ITR settings for a specific queue.
**/ **/
static void i40e_set_itr_per_queue(struct i40e_vsi *vsi, static void i40e_set_itr_per_queue(struct i40e_vsi *vsi,
struct ethtool_coalesce *ec, struct ethtool_coalesce *ec,
int queue) int queue)
@ -2265,8 +2257,8 @@ static int __i40e_set_coalesce(struct net_device *netdev,
vsi->int_rate_limit); vsi->int_rate_limit);
} }
/* rx and tx usecs has per queue value. If user doesn't specify the queue, /* rx and tx usecs has per queue value. If user doesn't specify the
* apply to all queues. * queue, apply to all queues.
*/ */
if (queue < 0) { if (queue < 0) {
for (i = 0; i < vsi->num_queue_pairs; i++) for (i = 0; i < vsi->num_queue_pairs; i++)