• A
    net: phy: mdio-bcm-unimac: mark PM functions as __maybe_unused · 914834a7
    Arnd Bergmann 提交于
    [ Upstream commit 9b97123a584f60a5bca5a2663485768a1f6cd0a4 ]
    
    The newly added runtime-pm support causes a harmless warning
    when CONFIG_PM is disabled:
    
    drivers/net/phy/mdio-bcm-unimac.c:330:12: error: 'unimac_mdio_resume' defined but not used [-Werror=unused-function]
     static int unimac_mdio_resume(struct device *d)
    drivers/net/phy/mdio-bcm-unimac.c:321:12: error: 'unimac_mdio_suspend' defined but not used [-Werror=unused-function]
     static int unimac_mdio_suspend(struct device *d)
    
    Marking the functions as __maybe_unused is the easiest workaround
    and avoids adding #ifdef checks.
    
    Fixes: b78ac6ecd1b6 ("net: phy: mdio-bcm-unimac: Allow configuring MDIO clock divider")
    Signed-off-by: NArnd Bergmann <arnd@arndb.de>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    Signed-off-by: NSasha Levin <sashal@kernel.org>
    914834a7
mdio-bcm-unimac.c 9.2 KB