Using function pointer arrays makes the code easier to read and better maintainable. AFAIK function pointer arrays cause some performance drawback due to Spectre mitigation, but we're not in a hot path.
Heiner Kallweit (2): r8169: create function pointer array for PHY init functions r8169: create function pointer array for chip hw init functions drivers/net/ethernet/realtek/r8169.c | 401 +++++++++------------------ 1 file changed, 127 insertions(+), 274 deletions(-) -- 2.21.0