]> www.infradead.org Git - users/dwmw2/linux.git/commit
net: pcs: xpcs: remove switch() in xpcs_link_up_1000basex()
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Thu, 17 Oct 2024 11:52:44 +0000 (12:52 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Wed, 23 Oct 2024 14:10:16 +0000 (16:10 +0200)
commit8d2aeab4ce782df9d7cd035938f4545af7db260e
tree0b0b297a8b8ef03e8e7c483dfde80342b22eaf9b
parent1d2709d6d3902786bfc3e9ede627e7364633cff7
net: pcs: xpcs: remove switch() in xpcs_link_up_1000basex()

Remove an unnecessary switch() statement in xpcs_link_up_1000basex().
The only value this switch statement is interested in is SPEED_1000,
all other values lead to an error. Replace this with a simple if()
statement.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Tested-by: Serge Semin <fancer.lancer@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/pcs/pcs-xpcs.c