Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1643688 > unrolled thread

[PATCH] phy-rockchip-pcie: Mark phy_rd_cfg() as __maybe_unused

Started byMatthias Kaehlcke <mka@chromium.org>
First post2017-05-18 01:10 +0200
Last post2017-05-18 02:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] phy-rockchip-pcie: Mark phy_rd_cfg() as __maybe_unused Matthias Kaehlcke <mka@chromium.org> - 2017-05-18 01:10 +0200
    Re: [PATCH] phy-rockchip-pcie: Mark phy_rd_cfg() as __maybe_unused Shawn Lin <shawn.lin@rock-chips.com> - 2017-05-18 02:40 +0200

#1643688 — [PATCH] phy-rockchip-pcie: Mark phy_rd_cfg() as __maybe_unused

FromMatthias Kaehlcke <mka@chromium.org>
Date2017-05-18 01:10 +0200
Subject[PATCH] phy-rockchip-pcie: Mark phy_rd_cfg() as __maybe_unused
Message-ID<tIgeR-187-7@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1643719

FromShawn Lin <shawn.lin@rock-chips.com>
Date2017-05-18 02:40 +0200
Message-ID<tIhDX-1Ui-1@gated-at.bofh.it>
In reply to#1643688
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;
>
>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web