Received: by 2002:ac0:b08d:0:0:0:0:0 with SMTP id l13csp3958910imc; Sun, 24 Feb 2019 17:50:54 -0800 (PST) X-Google-Smtp-Source: AHgI3IaTReD+SxpE+co3WV0fv3o8t5CuRhKocLcjydPpEkiRJPxd3Gkq0eDDgUBqFn24zizGNNRQ X-Received: by 2002:a17:902:64:: with SMTP id 91mr17920792pla.229.1551059454818; Sun, 24 Feb 2019 17:50:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551059454; cv=none; d=google.com; s=arc-20160816; b=Sh3kj2qbCIhDbac2Cm72uYTuA2waDemDkAmp1nqgAt+Z1o0NDkhNEltv5QMbtT/j+K pi5h3YeDeuVgQMdBSdwpyOnrDFpWkS/rNWR6FnAZWNLoH4VKXEYZUdJxucMcC4jAF7hq mxe83kKkIb4z7xPImQ+v1iM2aghJkdK7tdvMWy/ZeGh95HzhDoSvaU9WfdzUFnaRe66V kFJSSh9n3J1+bRvmOuzEoq81nBR0IHikfN1F7jK1Uo3sRhYH455yb22qZHd+OsGYipoy AgXnbfLp7PqzacV3ZnMaR1fauGynB6bbLnoa+qkJ7WQ5WsONHV83cH8Tg+gdL3fUyxo0 v34g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=//j7g0KKYZQuXuitZi4/spfAeS0irSjGwRxLpsOasa4=; b=0793Toxu/xEb44A1HDZ2d6h0vwPPqnRMesk2VW7m3+hZdrbrVEJcN/R3yaiiuI0qKU oRAtTWPPGgtEPEffJyEf/eV67jz8s/1m6Ju6chk3Kxt+u4yt5iiVD4Dk6ZP7e93DUzyk ECmDdx0HBSLuVIRYaxUkdBuK+ivzXk8J/Kg1NRVkXQKxYm94APGwMvGmSPL0gDLQO/d6 QxFkadJ3RPkXIifNxRkMYeU9cbFYwDFUM1ciPaF6TLd1KwTVmU0Y3VGGWPpK2n7jsGw7 /0fx/w9N3bX7wBVbaRrvI9EAgfUeJfRjRlPAjevDrjyz0upetmVFmWqeIDZ3S9hHHSsw hI6w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z7si7657368pgv.205.2019.02.24.17.50.35; Sun, 24 Feb 2019 17:50:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728382AbfBYBuP (ORCPT + 99 others); Sun, 24 Feb 2019 20:50:15 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:4723 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726511AbfBYBuP (ORCPT ); Sun, 24 Feb 2019 20:50:15 -0500 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 33468D51ED11DF8778F2; Mon, 25 Feb 2019 09:50:13 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.408.0; Mon, 25 Feb 2019 09:50:03 +0800 From: YueHaibing To: Jiri Pirko , Ido Schimmel , CC: YueHaibing , , , Subject: [PATCH net-next] mlxsw: spectrum: remove set but not used variable 'autoneg_status' Date: Mon, 25 Feb 2019 02:03:28 +0000 Message-ID: <20190225020328.42510-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/mellanox/mlxsw/spectrum.c: In function 'mlxsw_sp_port_get_link_ksettings': drivers/net/ethernet/mellanox/mlxsw/spectrum.c:3062:5: warning: variable 'autoneg_status' set but not used [-Wunused-but-set-variable] It's not used since commit 475b33cb66c9 ("mlxsw: spectrum: Remove unsupported eth_proto_lp_advertise field in PTYS") Signed-off-by: YueHaibing --- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c index 40177b9834c4..b00f6f74f91a 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c @@ -3059,7 +3059,6 @@ static int mlxsw_sp_port_get_link_ksettings(struct net_device *dev, const struct mlxsw_sp_port_type_speed_ops *ops; char ptys_pl[MLXSW_REG_PTYS_LEN]; u8 connector_type; - u8 autoneg_status; bool autoneg; int err; @@ -3079,8 +3078,6 @@ static int mlxsw_sp_port_get_link_ksettings(struct net_device *dev, mlxsw_sp_port_get_link_advertise(mlxsw_sp, eth_proto_admin, autoneg, cmd); - autoneg_status = mlxsw_reg_ptys_an_status_get(ptys_pl); - cmd->base.autoneg = autoneg ? AUTONEG_ENABLE : AUTONEG_DISABLE; connector_type = mlxsw_reg_ptys_connector_type_get(ptys_pl); cmd->base.port = mlxsw_sp_port_connector_port(connector_type);