Commit 9a865a98 authored by Tom Rix's avatar Tom Rix Committed by Jakub Kicinski

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: default avatarTom Rix <trix@redhat.com>
Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
Link: https://lore.kernel.org/r/20230329125929.1808420-1-trix@redhat.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 79548b79
...@@ -3213,7 +3213,6 @@ static void port_get_link_speed(struct ksz_port *port) ...@@ -3213,7 +3213,6 @@ static void port_get_link_speed(struct ksz_port *port)
u8 remote; u8 remote;
int i; int i;
int p; int p;
int change = 0;
interrupt = hw_block_intr(hw); interrupt = hw_block_intr(hw);
...@@ -3260,17 +3259,14 @@ static void port_get_link_speed(struct ksz_port *port) ...@@ -3260,17 +3259,14 @@ static void port_get_link_speed(struct ksz_port *port)
port_cfg_back_pressure(hw, p, port_cfg_back_pressure(hw, p,
(1 == info->duplex)); (1 == info->duplex));
} }
change |= 1 << i;
port_cfg_change(hw, port, info, status); port_cfg_change(hw, port, info, status);
} }
info->state = media_connected; info->state = media_connected;
} else { } 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; hw->port_mib[p].link_down = 1;
}
info->state = media_disconnected; info->state = media_disconnected;
} }
hw->port_mib[p].state = (u8) info->state; hw->port_mib[p].state = (u8) info->state;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment