Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1421470
| From | Shawn Lin <shawn.lin@rock-chips.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 09/11] phy: rockchip-emmc: Minor code cleanup in rockchip_emmc_phy_power_on/off() |
| Date | 2016-06-14 02:40 +0200 |
| Message-ID | <rJKyB-5yc-13@gated-at.bofh.it> (permalink) |
| References | <rJJ9v-4Iu-3@gated-at.bofh.it> <rJJ9w-4Iu-37@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
在 2016/6/14 7:04, Douglas Anderson 写道:
> There's no reason to store the return value of rockchip_emmc_phy_power()
> in a variable nor to check it. Just return it.
>
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ---
> Changes in v2:
> - Move code cleanup before set phyctrl_frqsel based on card clock (Shawn)
Looks good to me.
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
>
> drivers/phy/phy-rockchip-emmc.c | 14 ++------------
> 1 file changed, 2 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/phy/phy-rockchip-emmc.c b/drivers/phy/phy-rockchip-emmc.c
> index 2d059c046978..23fe50864526 100644
> --- a/drivers/phy/phy-rockchip-emmc.c
> +++ b/drivers/phy/phy-rockchip-emmc.c
> @@ -169,20 +169,14 @@ static int rockchip_emmc_phy_power(struct rockchip_emmc_phy *rk_phy,
> static int rockchip_emmc_phy_power_off(struct phy *phy)
> {
> struct rockchip_emmc_phy *rk_phy = phy_get_drvdata(phy);
> - int ret = 0;
>
> /* Power down emmc phy analog blocks */
> - ret = rockchip_emmc_phy_power(rk_phy, PHYCTRL_PDB_PWR_OFF);
> - if (ret)
> - return ret;
> -
> - return 0;
> + return rockchip_emmc_phy_power(rk_phy, PHYCTRL_PDB_PWR_OFF);
> }
>
> static int rockchip_emmc_phy_power_on(struct phy *phy)
> {
> struct rockchip_emmc_phy *rk_phy = phy_get_drvdata(phy);
> - int ret = 0;
>
> /* DLL operation: 200 MHz */
> regmap_write(rk_phy->reg_base,
> @@ -213,11 +207,7 @@ static int rockchip_emmc_phy_power_on(struct phy *phy)
> PHYCTRL_OTAPDLYSEL_SHIFT));
>
> /* Power up emmc phy analog blocks */
> - ret = rockchip_emmc_phy_power(rk_phy, PHYCTRL_PDB_PWR_ON);
> - if (ret)
> - return ret;
> -
> - return 0;
> + return rockchip_emmc_phy_power(rk_phy, PHYCTRL_PDB_PWR_ON);
> }
>
> static const struct phy_ops ops = {
>
--
Best Regards
Shawn Lin
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 0/11] Changes to support 150 MHz eMMC on rk3399 Douglas Anderson <dianders@chromium.org> - 2016-06-14 01:10 +0200
[PATCH v2 11/11] arm64: dts: rockchip: Provide emmcclk to PHY for rk3399 Douglas Anderson <dianders@chromium.org> - 2016-06-14 01:10 +0200
Re: [PATCH v2 11/11] arm64: dts: rockchip: Provide emmcclk to PHY for rk3399 Heiko Stübner <heiko@sntech.de> - 2016-06-18 14:10 +0200
[PATCH v2 04/11] mmc: sdhci-of-arasan: Properly set corecfg_baseclkfreq on rk3399 Douglas Anderson <dianders@chromium.org> - 2016-06-14 01:10 +0200
Re: [PATCH v2 04/11] mmc: sdhci-of-arasan: Properly set corecfg_baseclkfreq on rk3399 Heiko Stuebner <heiko@sntech.de> - 2016-06-18 20:10 +0200
[PATCH v2 07/11] mmc: sdhci-of-arasan: Add ability to export card clock Douglas Anderson <dianders@chromium.org> - 2016-06-14 01:10 +0200
Re: [PATCH v2 07/11] mmc: sdhci-of-arasan: Add ability to export card clock Doug Anderson <dianders@chromium.org> - 2016-06-15 18:50 +0200
[PATCH v2 08/11] Documentation: phy: Let the rockchip eMMC PHY get an exported card clock Douglas Anderson <dianders@chromium.org> - 2016-06-14 01:10 +0200
Re: [PATCH v2 08/11] Documentation: phy: Let the rockchip eMMC PHY get an exported card clock Rob Herring <robh@kernel.org> - 2016-06-16 20:50 +0200
Re: [PATCH v2 08/11] Documentation: phy: Let the rockchip eMMC PHY get an exported card clock Heiko Stübner <heiko@sntech.de> - 2016-06-18 23:50 +0200
Re: [PATCH v2 08/11] Documentation: phy: Let the rockchip eMMC PHY get an exported card clock Kishon Vijay Abraham I <kishon@ti.com> - 2016-06-20 15:10 +0200
[PATCH v2 09/11] phy: rockchip-emmc: Minor code cleanup in rockchip_emmc_phy_power_on/off() Douglas Anderson <dianders@chromium.org> - 2016-06-14 01:10 +0200
Re: [PATCH v2 09/11] phy: rockchip-emmc: Minor code cleanup in rockchip_emmc_phy_power_on/off() Shawn Lin <shawn.lin@rock-chips.com> - 2016-06-14 02:40 +0200
[PATCH v2 06/11] Documentation: mmc: sdhci-of-arasan: Add ability to export card clock Douglas Anderson <dianders@chromium.org> - 2016-06-14 01:10 +0200
Re: [PATCH v2 06/11] Documentation: mmc: sdhci-of-arasan: Add ability to export card clock Heiko Stuebner <heiko@sntech.de> - 2016-06-18 20:10 +0200
[PATCH v2 01/11] phy: rockchip-emmc: Increase lock time allowance Douglas Anderson <dianders@chromium.org> - 2016-06-14 01:20 +0200
Re: [PATCH v2 01/11] phy: rockchip-emmc: Increase lock time allowance Shawn Lin <shawn.lin@rock-chips.com> - 2016-06-14 02:30 +0200
[PATCH v2 03/11] Documentation: mmc: sdhci-of-arasan: Add soc-ctl-syscon for corecfg regs Douglas Anderson <dianders@chromium.org> - 2016-06-14 01:20 +0200
Re: [PATCH v2 03/11] Documentation: mmc: sdhci-of-arasan: Add soc-ctl-syscon for corecfg regs Shawn Lin <shawn.lin@rock-chips.com> - 2016-06-14 02:40 +0200
Re: [PATCH v2 03/11] Documentation: mmc: sdhci-of-arasan: Add soc-ctl-syscon for corecfg regs Heiko Stübner <heiko@sntech.de> - 2016-06-18 16:20 +0200
Re: [PATCH v2 0/11] Changes to support 150 MHz eMMC on rk3399 Heiko Stuebner <heiko@sntech.de> - 2016-06-17 01:50 +0200
Re: [PATCH v2 0/11] Changes to support 150 MHz eMMC on rk3399 Kishon Vijay Abraham I <kishon@ti.com> - 2016-06-17 14:50 +0200
Re: [PATCH v2 0/11] Changes to support 150 MHz eMMC on rk3399 Doug Anderson <dianders@chromium.org> - 2016-06-17 17:40 +0200
csiph-web