]> git.baikalelectronics.ru Git - kernel.git/commit
ethernet: ucc_geth: inform the compiler that numQueues is always 1
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>
Tue, 19 Jan 2021 15:08:01 +0000 (16:08 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 21 Jan 2021 20:19:56 +0000 (12:19 -0800)
commitf39db836b090ef8941ea1cc82002627d734189d7
tree124fd37a9c53410253c68d65a0e038e0166ba34b
parentb22f62ba908bf0b623e3eb2b482f10d9c4a4e6a9
ethernet: ucc_geth: inform the compiler that numQueues is always 1

The numQueuesTx and numQueuesRx members of struct ucc_geth_info are
never set to anything but 1, and never have been. It's unclear how
well the code supporting multiple queues would work. Until somebody
wants to play with enabling that, help the compiler eliminate a lot of
dead code and loops that are not really loops by creating static
inline helpers. If and when the numQueuesTx/numQueuesRx fields are
re-introduced, it suffices to update those helper to return the
appropriate field.

This cuts the .text segment of ucc_geth.o by 8%.

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