]> git.baikalelectronics.ru Git - kernel.git/commit
ethernet: ucc_geth: add helper to replace repeated switch statements
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>
Tue, 19 Jan 2021 15:08:00 +0000 (16:08 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 21 Jan 2021 20:19:56 +0000 (12:19 -0800)
commitb22f62ba908bf0b623e3eb2b482f10d9c4a4e6a9
tree9ac568c38c8fa70acf9704f82260ca22fc65ae58
parent694590b027e513c854c0a0147c3015145799c364
ethernet: ucc_geth: add helper to replace repeated switch statements

The translation from the ucc_geth_num_of_threads enum value to the
actual count can be written somewhat more compactly with a small
lookup table, allowing us to replace the four switch statements.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/freescale/ucc_geth.c