From patchwork Wed Dec 12 08:33:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 10725673 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6F30E174F for ; Wed, 12 Dec 2018 08:26:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5970428329 for ; Wed, 12 Dec 2018 08:26:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 491AE2B15B; Wed, 12 Dec 2018 08:26:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AE16828329 for ; Wed, 12 Dec 2018 08:26:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726635AbeLLI0G (ORCPT ); Wed, 12 Dec 2018 03:26:06 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:15675 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726317AbeLLI0G (ORCPT ); Wed, 12 Dec 2018 03:26:06 -0500 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 212EA2038AE33; Wed, 12 Dec 2018 16:26:03 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.408.0; Wed, 12 Dec 2018 16:25:56 +0800 From: YueHaibing To: Saeed Mahameed , Leon Romanovsky CC: YueHaibing , , , Subject: [PATCH net-next] net/mlx5e: Remove set but not used variable 'upriv' Date: Wed, 12 Dec 2018 08:33:53 +0000 Message-ID: <1544603633-170212-1-git-send-email-yuehaibing@huawei.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/mellanox/mlx5/core/en_rep.c: In function 'mlx5e_vport_rep_load': drivers/net/ethernet/mellanox/mlx5/core/en_rep.c:1490:21: warning: variable 'upriv' set but not used [-Wunused-but-set-variable] drivers/net/ethernet/mellanox/mlx5/core/en_rep.c: In function 'mlx5e_vport_rep_unload': drivers/net/ethernet/mellanox/mlx5/core/en_rep.c:1557:21: warning: variable 'upriv' set but not used [-Wunused-but-set-variable] It not used any more since commit ef381359e3a8 ("net/mlx5e: Replace egdev with indirect block notifications"). Also remove unused variable 'uplink_rpriv' after this change. Signed-off-by: YueHaibing Reviewed-by: Leon Romanovsky Acked-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c index 85e51bd..e5230049 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c @@ -1484,10 +1484,8 @@ static int mlx5e_init_rep_tx(struct mlx5e_priv *priv) static int mlx5e_vport_rep_load(struct mlx5_core_dev *dev, struct mlx5_eswitch_rep *rep) { - struct mlx5e_rep_priv *uplink_rpriv; struct mlx5e_rep_priv *rpriv; struct net_device *netdev; - struct mlx5e_priv *upriv; int nch, err; rpriv = kzalloc(sizeof(*rpriv), GFP_KERNEL); @@ -1522,9 +1520,6 @@ static int mlx5e_init_rep_tx(struct mlx5e_priv *priv) goto err_detach_netdev; } - uplink_rpriv = mlx5_eswitch_get_uplink_priv(dev->priv.eswitch, REP_ETH); - upriv = netdev_priv(uplink_rpriv->netdev); - err = register_netdev(netdev); if (err) { pr_warn("Failed to register representor netdev for vport %d\n", @@ -1552,14 +1547,9 @@ static int mlx5e_init_rep_tx(struct mlx5e_priv *priv) struct mlx5e_rep_priv *rpriv = mlx5e_rep_to_rep_priv(rep); struct net_device *netdev = rpriv->netdev; struct mlx5e_priv *priv = netdev_priv(netdev); - struct mlx5e_rep_priv *uplink_rpriv; void *ppriv = priv->ppriv; - struct mlx5e_priv *upriv; unregister_netdev(netdev); - uplink_rpriv = mlx5_eswitch_get_uplink_priv(priv->mdev->priv.eswitch, - REP_ETH); - upriv = netdev_priv(uplink_rpriv->netdev); mlx5e_rep_neigh_cleanup(rpriv); mlx5e_detach_netdev(priv); mlx5e_destroy_netdev(priv);