summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/micrel
diff options
context:
space:
mode:
authorTom Rix <trix@redhat.com>2023-03-29 08:59:29 -0400
committerJakub Kicinski <kuba@kernel.org>2023-03-30 23:18:48 -0700
commit9a865a98a3360d06f92549839abda1bc96104aea (patch)
treea0e3a86de163695c98c88013105a43f2e791a63f /drivers/net/ethernet/micrel
parent79548b7984e4c606c6caaad72a0864a83855ebc9 (diff)
downloadlwn-9a865a98a3360d06f92549839abda1bc96104aea.tar.gz
lwn-9a865a98a3360d06f92549839abda1bc96104aea.zip
net: ksz884x: remove unused change variable
clang with W=1 reports drivers/net/ethernet/micrel/ksz884x.c:3216:6: error: variable 'change' set but not used [-Werror,-Wunused-but-set-variable] int change = 0; ^ This variable is not used so remove it. Signed-off-by: Tom Rix <trix@redhat.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Link: https://lore.kernel.org/r/20230329125929.1808420-1-trix@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/micrel')
-rw-r--r--drivers/net/ethernet/micrel/ksz884x.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/net/ethernet/micrel/ksz884x.c b/drivers/net/ethernet/micrel/ksz884x.c
index e6acd1e7b263..f78e8ead8c36 100644
--- a/drivers/net/ethernet/micrel/ksz884x.c
+++ b/drivers/net/ethernet/micrel/ksz884x.c
@@ -3213,7 +3213,6 @@ static void port_get_link_speed(struct ksz_port *port)
u8 remote;
int i;
int p;
- int change = 0;
interrupt = hw_block_intr(hw);
@@ -3260,17 +3259,14 @@ static void port_get_link_speed(struct ksz_port *port)
port_cfg_back_pressure(hw, p,
(1 == info->duplex));
}
- change |= 1 << i;
port_cfg_change(hw, port, info, status);
}
info->state = media_connected;
} else {
- if (media_disconnected != info->state) {
- change |= 1 << i;
-
- /* Indicate the link just goes down. */
+ /* Indicate the link just goes down. */
+ if (media_disconnected != info->state)
hw->port_mib[p].link_down = 1;
- }
+
info->state = media_disconnected;
}
hw->port_mib[p].state = (u8) info->state;