From patchwork Tue Dec 17 12:26:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yunfeng Ye X-Patchwork-Id: 1211621 X-Patchwork-Delegate: jeffrey.t.kirsher@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=huawei.com Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47cmfZ2F3mz9sRC for ; Wed, 18 Dec 2019 05:20:54 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 65E0E875DB; Tue, 17 Dec 2019 18:20:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id D69MLjuAp+DE; Tue, 17 Dec 2019 18:20:51 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 7305286D9A; Tue, 17 Dec 2019 18:20:51 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 033F21BF2F1 for ; Tue, 17 Dec 2019 12:27:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id F2FEE2034D for ; Tue, 17 Dec 2019 12:27:22 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lyR3DkA66xfL for ; Tue, 17 Dec 2019 12:27:21 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from huawei.com (szxga05-in.huawei.com [45.249.212.191]) by silver.osuosl.org (Postfix) with ESMTPS id 85FDB203F8 for ; Tue, 17 Dec 2019 12:27:21 +0000 (UTC) Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 868097557868119F8E09; Tue, 17 Dec 2019 20:27:17 +0800 (CST) Received: from [127.0.0.1] (10.177.251.225) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.439.0; Tue, 17 Dec 2019 20:27:10 +0800 To: , , , , , "hushiyuan@huawei.com" , "linfeilong@huawei.com" From: Yunfeng Ye Message-ID: Date: Tue, 17 Dec 2019 20:26:34 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 Content-Language: en-US X-Originating-IP: [10.177.251.225] X-CFilter-Loop: Reflected X-Mailman-Approved-At: Tue, 17 Dec 2019 18:20:49 +0000 Subject: [Intel-wired-lan] [PATCH] e100: remove unused varibale err in e100_diag_test() X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" This patch fix following warning: drivers/net/ethernet/intel/e100.c: In function ‘e100_diag_test’: drivers/net/ethernet/intel/e100.c:2600:9: warning: variable ‘err’ set but not used [-Wunused-but-set-variable] int i, err; ^~~ Signed-off-by: Yunfeng Ye --- drivers/net/ethernet/intel/e100.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/intel/e100.c b/drivers/net/ethernet/intel/e100.c index a65d5a9ba7db..f1cb493a811f 100644 --- a/drivers/net/ethernet/intel/e100.c +++ b/drivers/net/ethernet/intel/e100.c @@ -2597,7 +2597,7 @@ static void e100_diag_test(struct net_device *netdev, { struct ethtool_cmd cmd; struct nic *nic = netdev_priv(netdev); - int i, err; + int i; memset(data, 0, E100_TEST_LEN * sizeof(u64)); data[0] = !mii_link_ok(&nic->mii); @@ -2605,7 +2605,7 @@ static void e100_diag_test(struct net_device *netdev, if (test->flags & ETH_TEST_FL_OFFLINE) { /* save speed, duplex & autoneg settings */ - err = mii_ethtool_gset(&nic->mii, &cmd); + mii_ethtool_gset(&nic->mii, &cmd); if (netif_running(netdev)) e100_down(nic); @@ -2614,7 +2614,7 @@ static void e100_diag_test(struct net_device *netdev, data[4] = e100_loopback_test(nic, lb_phy); /* restore speed, duplex & autoneg settings */ - err = mii_ethtool_sset(&nic->mii, &cmd); + mii_ethtool_sset(&nic->mii, &cmd); if (netif_running(netdev)) e100_up(nic);