Commit 9d9f95a9 authored by Luo bin's avatar Luo bin Committed by David S. Miller

hinic: remove unused but set variable

remove unused but set variable to avoid auto build test WARNING
Signed-off-by: default avatarLuo bin <luobin9@huawei.com>
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e25974ae
...@@ -749,12 +749,9 @@ static int __set_hw_coal_param(struct hinic_dev *nic_dev, ...@@ -749,12 +749,9 @@ static int __set_hw_coal_param(struct hinic_dev *nic_dev,
static int __hinic_set_coalesce(struct net_device *netdev, static int __hinic_set_coalesce(struct net_device *netdev,
struct ethtool_coalesce *coal, u16 queue) struct ethtool_coalesce *coal, u16 queue)
{ {
struct hinic_intr_coal_info *ori_rx_intr_coal = NULL;
struct hinic_intr_coal_info *ori_tx_intr_coal = NULL;
struct hinic_dev *nic_dev = netdev_priv(netdev); struct hinic_dev *nic_dev = netdev_priv(netdev);
struct hinic_intr_coal_info rx_intr_coal = {0}; struct hinic_intr_coal_info rx_intr_coal = {0};
struct hinic_intr_coal_info tx_intr_coal = {0}; struct hinic_intr_coal_info tx_intr_coal = {0};
char obj_str[OBJ_STR_MAX_LEN] = {0};
bool set_rx_coal = false; bool set_rx_coal = false;
bool set_tx_coal = false; bool set_tx_coal = false;
int err; int err;
...@@ -779,21 +776,6 @@ static int __hinic_set_coalesce(struct net_device *netdev, ...@@ -779,21 +776,6 @@ static int __hinic_set_coalesce(struct net_device *netdev,
set_tx_coal = true; set_tx_coal = true;
} }
if (queue == COALESCE_ALL_QUEUE) {
ori_rx_intr_coal = &nic_dev->rx_intr_coalesce[0];
ori_tx_intr_coal = &nic_dev->tx_intr_coalesce[0];
err = snprintf(obj_str, OBJ_STR_MAX_LEN, "for netdev");
} else {
ori_rx_intr_coal = &nic_dev->rx_intr_coalesce[queue];
ori_tx_intr_coal = &nic_dev->tx_intr_coalesce[queue];
err = snprintf(obj_str, OBJ_STR_MAX_LEN, "for queue %d", queue);
}
if (err <= 0 || err >= OBJ_STR_MAX_LEN) {
netif_err(nic_dev, drv, netdev, "Failed to snprintf string, function return(%d) and dest_len(%d)\n",
err, OBJ_STR_MAX_LEN);
return -EFAULT;
}
/* setting coalesce timer or pending limit to zero will disable /* setting coalesce timer or pending limit to zero will disable
* coalesce * coalesce
*/ */
......
...@@ -1060,9 +1060,7 @@ static int hinic_init_vf_infos(struct hinic_func_to_io *nic_io, u16 vf_id) ...@@ -1060,9 +1060,7 @@ static int hinic_init_vf_infos(struct hinic_func_to_io *nic_io, u16 vf_id)
static void hinic_clear_vf_infos(struct hinic_dev *nic_dev, u16 vf_id) static void hinic_clear_vf_infos(struct hinic_dev *nic_dev, u16 vf_id)
{ {
struct vf_data_storage *vf_infos; struct vf_data_storage *vf_infos;
u16 func_id;
func_id = hinic_glb_pf_vf_offset(nic_dev->hwdev->hwif) + vf_id;
vf_infos = nic_dev->hwdev->func_to_io.vf_infos + HW_VF_ID_TO_OS(vf_id); vf_infos = nic_dev->hwdev->func_to_io.vf_infos + HW_VF_ID_TO_OS(vf_id);
if (vf_infos->pf_set_mac) if (vf_infos->pf_set_mac)
hinic_port_del_mac(nic_dev, vf_infos->vf_mac_addr, 0); hinic_port_del_mac(nic_dev, vf_infos->vf_mac_addr, 0);
......
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