mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Luo bin <luobin9@huawei.com>
To: <davem@davemloft.net>
Cc: <linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>,
	<luoxianjun@huawei.com>, <yin.yinshi@huawei.com>,
	<cloud.wangxiaoyun@huawei.com>, <chiqijun@huawei.com>
Subject: [PATCH net-next] hinic: remove unused but set variable
Date: Tue, 30 Jun 2020 10:30:34 +0800	[thread overview]
Message-ID: <20200630023034.9281-1-luobin9@huawei.com> (raw)

remove unused but set variable to avoid auto build test WARNING

Signed-off-by: Luo bin <luobin9@huawei.com>
Reported-by: kernel test robot <lkp@intel.com>
---
 .../net/ethernet/huawei/hinic/hinic_ethtool.c  | 18 ------------------
 .../net/ethernet/huawei/hinic/hinic_sriov.c    |  2 --
 2 files changed, 20 deletions(-)

diff --git a/drivers/net/ethernet/huawei/hinic/hinic_ethtool.c b/drivers/net/ethernet/huawei/hinic/hinic_ethtool.c
index a4a2a2d68f5c..cb5ebae54f73 100644
--- a/drivers/net/ethernet/huawei/hinic/hinic_ethtool.c
+++ b/drivers/net/ethernet/huawei/hinic/hinic_ethtool.c
@@ -749,12 +749,9 @@ static int __set_hw_coal_param(struct hinic_dev *nic_dev,
 static int __hinic_set_coalesce(struct net_device *netdev,
 				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_intr_coal_info rx_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_tx_coal = false;
 	int err;
@@ -779,21 +776,6 @@ static int __hinic_set_coalesce(struct net_device *netdev,
 		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
 	 * coalesce
 	 */
diff --git a/drivers/net/ethernet/huawei/hinic/hinic_sriov.c b/drivers/net/ethernet/huawei/hinic/hinic_sriov.c
index f5c7c1f48542..caf7e81e3f62 100644
--- a/drivers/net/ethernet/huawei/hinic/hinic_sriov.c
+++ b/drivers/net/ethernet/huawei/hinic/hinic_sriov.c
@@ -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)
 {
 	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);
 	if (vf_infos->pf_set_mac)
 		hinic_port_del_mac(nic_dev, vf_infos->vf_mac_addr, 0);
-- 
2.17.1


             reply	other threads:[~2020-06-30  2:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-30  2:30 Luo bin [this message]
2020-06-30 19:42 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200630023034.9281-1-luobin9@huawei.com \
    --to=luobin9@huawei.com \
    --cc=chiqijun@huawei.com \
    --cc=cloud.wangxiaoyun@huawei.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luoxianjun@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=yin.yinshi@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®