Commit c73bf3bd authored by Paul M Stillwell Jr's avatar Paul M Stillwell Jr Committed by Tony Nguyen

ice: remove local variable

Remove the local variable since it's only used once. Instead, use it
directly.
Signed-off-by: default avatarPaul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Tested-by: default avatarTony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent b6b0501d
...@@ -3078,7 +3078,6 @@ static void ice_set_netdev_features(struct net_device *netdev) ...@@ -3078,7 +3078,6 @@ static void ice_set_netdev_features(struct net_device *netdev)
*/ */
static int ice_cfg_netdev(struct ice_vsi *vsi) static int ice_cfg_netdev(struct ice_vsi *vsi)
{ {
struct ice_pf *pf = vsi->back;
struct ice_netdev_priv *np; struct ice_netdev_priv *np;
struct net_device *netdev; struct net_device *netdev;
u8 mac_addr[ETH_ALEN]; u8 mac_addr[ETH_ALEN];
...@@ -3098,7 +3097,7 @@ static int ice_cfg_netdev(struct ice_vsi *vsi) ...@@ -3098,7 +3097,7 @@ static int ice_cfg_netdev(struct ice_vsi *vsi)
ice_set_ops(netdev); ice_set_ops(netdev);
if (vsi->type == ICE_VSI_PF) { if (vsi->type == ICE_VSI_PF) {
SET_NETDEV_DEV(netdev, ice_pf_to_dev(pf)); SET_NETDEV_DEV(netdev, ice_pf_to_dev(vsi->back));
ether_addr_copy(mac_addr, vsi->port_info->mac.perm_addr); ether_addr_copy(mac_addr, vsi->port_info->mac.perm_addr);
ether_addr_copy(netdev->dev_addr, mac_addr); ether_addr_copy(netdev->dev_addr, mac_addr);
ether_addr_copy(netdev->perm_addr, mac_addr); ether_addr_copy(netdev->perm_addr, mac_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