The c_can, flexcan and slcan use a setter function to populate net_device::ethtool_ops. Using a setter here add one additional function call and add some small bloat in the object file. Exporting the structure allow to remove this setter. The mcp251xfd uses a similar pattern except that it does some additional initialization. As such, this driver is left untouched. * Statistics * For the slcan driver, this patch reduces the object file by 14 bytes (details in the first patch). Although we did not conduct a benchmark for the other drivers but we expect the exact same figures. Vincent Mailhol (3): can: slcan: export slcan_ethtool_ops and remove slcan_set_ethtool_ops() can: c_can: export c_can_ethtool_ops and remove c_can_set_ethtool_ops() can: flexcan: export flexcan_ethtool_ops and remove flexcan_set_ethtool_ops() drivers/net/can/c_can/c_can.h | 2 +- drivers/net/can/c_can/c_can_ethtool.c | 7 +------ drivers/net/can/c_can/c_can_main.c | 2 +- drivers/net/can/flexcan/flexcan-core.c | 2 +- drivers/net/can/flexcan/flexcan-ethtool.c | 7 +------ drivers/net/can/flexcan/flexcan.h | 2 +- drivers/net/can/slcan/slcan-core.c | 2 +- drivers/net/can/slcan/slcan-ethtool.c | 7 +------ drivers/net/can/slcan/slcan.h | 3 ++- 9 files changed, 10 insertions(+), 24 deletions(-) -- 2.35.1