lkml.org 
[lkml]   [2021]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] net: phy: make mdio_bus_phy_suspend/resume as __maybe_unused
On Thu, Feb 25, 2021 at 03:57:27PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> When CONFIG_PM_SLEEP is disabled, the compiler warns about unused
> functions:
>
> drivers/net/phy/phy_device.c:273:12: error: unused function 'mdio_bus_phy_suspend' [-Werror,-Wunused-function]
> static int mdio_bus_phy_suspend(struct device *dev)
> drivers/net/phy/phy_device.c:293:12: error: unused function 'mdio_bus_phy_resume' [-Werror,-Wunused-function]
> static int mdio_bus_phy_resume(struct device *dev)
>
> The logic is intentional, so just mark these two as __maybe_unused
> and remove the incorrect #ifdef.
>
> Fixes: 4c0d2e96ba05 ("net: phy: consider that suspend2ram may cut off PHY power")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

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

Andrew

\
 
 \ /
  Last update: 2021-02-25 23:55    [W:0.052 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site