[RFC PATCH net-next v3 06/15] net: dsa: mt7530: move p5_intf_modes() function to mt7530.c

Andrew Lunn andrew at lunn.ch
Wed Mar 29 09:28:38 PDT 2023


On Wed, Mar 29, 2023 at 04:58:35PM +0100, Daniel Golle wrote:
> In preparation of splitting mt7530.c into a driver for MDIO-connected
> as well as MDIO-accessed built-in switches on one hand and MMIO-accessed
> built-in switches move the p5_inft_modes() function from mt7530.h to
> mt7530.c. The function is only needed there and will trigger a compiler
> warning about a defined but unused function otherwise when including
> mt7530.h in the to-be-introduced bus-specific drivers.

The other way to avoid the warning is to mark it inline. The compiler
will not warn than. But this solution is also good.

Reviewed-by: Andrew Lunn <andrew at lunn.ch>

    Andrew



More information about the linux-arm-kernel mailing list