diff options
author | YueHaibing <yuehaibing@huawei.com> | 2020-01-03 04:48:56 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-01-03 21:22:12 +0100 |
commit | 4a883ccfba3adefc7123ec1a6da3c7301a56ce97 (patch) | |
tree | f86577476f7308c66f2ffa7a4f6f75361062e075 /net/ethtool | |
parent | tcp: use REXMIT_NEW instead of magic number (diff) | |
download | linux-4a883ccfba3adefc7123ec1a6da3c7301a56ce97.tar.xz linux-4a883ccfba3adefc7123ec1a6da3c7301a56ce97.zip |
ethtool: remove set but not used variable 'lsettings'
Fixes gcc '-Wunused-but-set-variable' warning:
net/ethtool/linkmodes.c: In function 'ethnl_set_linkmodes':
net/ethtool/linkmodes.c:326:32: warning:
variable 'lsettings' set but not used [-Wunused-but-set-variable]
struct ethtool_link_settings *lsettings;
^
It is never used, so remove it.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Michal Kubecek <mkubecek@suse.cz>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ethtool')
-rw-r--r-- | net/ethtool/linkmodes.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/net/ethtool/linkmodes.c b/net/ethtool/linkmodes.c index 0b99f494ad3b..96f20be64553 100644 --- a/net/ethtool/linkmodes.c +++ b/net/ethtool/linkmodes.c @@ -323,7 +323,6 @@ int ethnl_set_linkmodes(struct sk_buff *skb, struct genl_info *info) { struct nlattr *tb[ETHTOOL_A_LINKMODES_MAX + 1]; struct ethtool_link_ksettings ksettings = {}; - struct ethtool_link_settings *lsettings; struct ethnl_req_info req_info = {}; struct net_device *dev; bool mod = false; @@ -354,7 +353,6 @@ int ethnl_set_linkmodes(struct sk_buff *skb, struct genl_info *info) GENL_SET_ERR_MSG(info, "failed to retrieve link settings"); goto out_ops; } - lsettings = &ksettings.base; ret = ethnl_update_linkmodes(info, tb, &ksettings, &mod); if (ret < 0) |