From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754601AbdERAcn (ORCPT ); Wed, 17 May 2017 20:32:43 -0400 Received: from lucky1.263xmail.com ([211.157.147.131]:52182 "EHLO lucky1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754398AbdERAcl (ORCPT ); Wed, 17 May 2017 20:32:41 -0400 X-263anti-spam: KSV:0; X-MAIL-GRAY: 1 X-MAIL-DELIVERY: 0 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-RL-SENDER: shawn.lin@rock-chips.com X-FST-TO: dianders@chromium.org X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: shawn.lin@rock-chips.com X-UNIQUE-TAG: X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 Subject: Re: [PATCH] phy-rockchip-pcie: Mark phy_rd_cfg() as __maybe_unused To: Matthias Kaehlcke References: <20170517230316.191259-1-mka@chromium.org> Cc: Kishon Vijay Abraham I , Heiko Stuebner , shawn.lin@rock-chips.com, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Douglas Anderson From: Shawn Lin Message-ID: <07fa771b-dd7b-a324-143b-4784fbb697fb@rock-chips.com> Date: Thu, 18 May 2017 08:32:31 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170517230316.191259-1-mka@chromium.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Matthias, On 2017/5/18 7:03, Matthias Kaehlcke wrote: > The function is not used, but is probably kept around for debugging and > symmetry with phy_wr_cfg(). Adding the attribute fixes the following > warning when building with clang: > > drivers/phy/phy-rockchip-pcie.c:102:19: error: unused function > 'phy_rd_cfg' [-Werror,-Wunused-function] > Reviewed-by: Shawn Lin Thanks. > Signed-off-by: Matthias Kaehlcke > --- > drivers/phy/phy-rockchip-pcie.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/phy/phy-rockchip-pcie.c b/drivers/phy/phy-rockchip-pcie.c > index 6904633cad68..f8c6846094c0 100644 > --- a/drivers/phy/phy-rockchip-pcie.c > +++ b/drivers/phy/phy-rockchip-pcie.c > @@ -99,8 +99,8 @@ static inline void phy_wr_cfg(struct rockchip_pcie_phy *rk_phy, > PHY_CFG_WR_SHIFT)); > } > > -static inline u32 phy_rd_cfg(struct rockchip_pcie_phy *rk_phy, > - u32 addr) > +static inline u32 __maybe_unused > +phy_rd_cfg(struct rockchip_pcie_phy *rk_phy, u32 addr) > { > u32 val; > >