From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80CF6C4332D for ; Thu, 25 Feb 2021 22:54:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 563A264F28 for ; Thu, 25 Feb 2021 22:54:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232679AbhBYWy3 (ORCPT ); Thu, 25 Feb 2021 17:54:29 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:58262 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232375AbhBYWyL (ORCPT ); Thu, 25 Feb 2021 17:54:11 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1lFPVY-008Tg0-Vw; Thu, 25 Feb 2021 23:53:20 +0100 Date: Thu, 25 Feb 2021 23:53:20 +0100 From: Andrew Lunn To: Arnd Bergmann Cc: Heiner Kallweit , "David S. Miller" , Jakub Kicinski , Arnd Bergmann , Russell King , Florian Fainelli , Ioana Ciornei , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: phy: make mdio_bus_phy_suspend/resume as __maybe_unused Message-ID: References: <20210225145748.404410-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210225145748.404410-1-arnd@kernel.org> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, Feb 25, 2021 at 03:57:27PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > 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 Reviewed-by: Andrew Lunn Andrew