mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] phy-rockchip-pcie: Mark phy_rd_cfg() as __maybe_unused
@ 2017-05-17 23:03 Matthias Kaehlcke
  2017-05-18  0:32 ` Shawn Lin
  0 siblings, 1 reply; 2+ messages in thread
From: Matthias Kaehlcke @ 2017-05-17 23:03 UTC (permalink / raw)
  To: Kishon Vijay Abraham I, Heiko Stuebner
  Cc: linux-kernel, linux-arm-kernel, linux-rockchip, Douglas Anderson,
	Matthias Kaehlcke

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]

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---
 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;
 
-- 
2.13.0.303.g4ebf302169-goog

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] phy-rockchip-pcie: Mark phy_rd_cfg() as __maybe_unused
  2017-05-17 23:03 [PATCH] phy-rockchip-pcie: Mark phy_rd_cfg() as __maybe_unused Matthias Kaehlcke
@ 2017-05-18  0:32 ` Shawn Lin
  0 siblings, 0 replies; 2+ messages in thread
From: Shawn Lin @ 2017-05-18  0:32 UTC (permalink / raw)
  To: Matthias Kaehlcke
  Cc: Kishon Vijay Abraham I, Heiko Stuebner, shawn.lin,
	linux-rockchip, linux-kernel, linux-arm-kernel, Douglas Anderson

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 <shawn.lin@rock-chips.com>

Thanks.

> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> ---
>  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;
>
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-05-18  0:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-17 23:03 [PATCH] phy-rockchip-pcie: Mark phy_rd_cfg() as __maybe_unused Matthias Kaehlcke
2017-05-18  0:32 ` Shawn Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®