Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Tom Rix and committed by
Jakub Kicinski
9a865a98 79548b79

+3 -7
+3 -7
drivers/net/ethernet/micrel/ksz884x.c
··· 3213 3213 u8 remote; 3214 3214 int i; 3215 3215 int p; 3216 - int change = 0; 3217 3216 3218 3217 interrupt = hw_block_intr(hw); 3219 3218 ··· 3259 3260 port_cfg_back_pressure(hw, p, 3260 3261 (1 == info->duplex)); 3261 3262 } 3262 - change |= 1 << i; 3263 3263 port_cfg_change(hw, port, info, status); 3264 3264 } 3265 3265 info->state = media_connected; 3266 3266 } else { 3267 - if (media_disconnected != info->state) { 3268 - change |= 1 << i; 3269 - 3270 - /* Indicate the link just goes down. */ 3267 + /* Indicate the link just goes down. */ 3268 + if (media_disconnected != info->state) 3271 3269 hw->port_mib[p].link_down = 1; 3272 - } 3270 + 3273 3271 info->state = media_disconnected; 3274 3272 } 3275 3273 hw->port_mib[p].state = (u8) info->state;