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


Groups > linux.kernel > #1420634 > unrolled thread

Re: [PATCH 10/11] phy: rockchip-emmc: Minor code cleanup in rockchip_emmc_phy_power_off()

Started byShawn Lin <shawn.lin@rock-chips.com>
First post2016-06-13 11:00 +0200
Last post2016-06-14 01:10 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 10/11] phy: rockchip-emmc: Minor code cleanup in  rockchip_emmc_phy_power_off() Shawn Lin <shawn.lin@rock-chips.com> - 2016-06-13 11:00 +0200
    Re: [PATCH 10/11] phy: rockchip-emmc: Minor code cleanup in rockchip_emmc_phy_power_off() Doug Anderson <dianders@chromium.org> - 2016-06-14 01:10 +0200

#1420634 — Re: [PATCH 10/11] phy: rockchip-emmc: Minor code cleanup in rockchip_emmc_phy_power_off()

FromShawn Lin <shawn.lin@rock-chips.com>
Date2016-06-13 11:00 +0200
SubjectRe: [PATCH 10/11] phy: rockchip-emmc: Minor code cleanup in rockchip_emmc_phy_power_off()
Message-ID<rJvT1-3Sn-29@gated-at.bofh.it>
On 2016/6/8 6:44, Douglas Anderson wrote:
> 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>
> ---
>  drivers/phy/phy-rockchip-emmc.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/drivers/phy/phy-rockchip-emmc.c b/drivers/phy/phy-rockchip-emmc.c
> index 0fce7359d468..188e4c387ba8 100644
> --- a/drivers/phy/phy-rockchip-emmc.c
> +++ b/drivers/phy/phy-rockchip-emmc.c
> @@ -227,8 +227,6 @@ static int rockchip_emmc_phy_power_off(struct phy *phy)
>  static int rockchip_emmc_phy_power_on(struct phy *phy)
>  {

I saw the cleanup for power_off is done on [patch 9/11]

shouldn't be in this patch? :)

>  	struct rockchip_emmc_phy *rk_phy = phy_get_drvdata(phy);
> -	int ret = 0;
> -
>
>  	/* Drive impedance: 50 Ohm */
>  	regmap_write(rk_phy->reg_base,
> @@ -252,11 +250,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(phy, PHYCTRL_PDB_PWR_ON);
> -	if (ret)
> -		return ret;
> -
> -	return 0;
> +	return rockchip_emmc_phy_power(phy, PHYCTRL_PDB_PWR_ON);
>  }
>
>  static const struct phy_ops ops = {
>


-- 
Best Regards
Shawn Lin

[toc] | [next] | [standalone]


#1421431 — Re: [PATCH 10/11] phy: rockchip-emmc: Minor code cleanup in rockchip_emmc_phy_power_off()

FromDoug Anderson <dianders@chromium.org>
Date2016-06-14 01:10 +0200
SubjectRe: [PATCH 10/11] phy: rockchip-emmc: Minor code cleanup in rockchip_emmc_phy_power_off()
Message-ID<rJJ9v-4Iu-23@gated-at.bofh.it>
In reply to#1420634
Hi,

On Mon, Jun 13, 2016 at 1:56 AM, Shawn Lin <shawn.lin@rock-chips.com> wrote:
> On 2016/6/8 6:44, Douglas Anderson wrote:
>>
>> 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>
>> ---
>>  drivers/phy/phy-rockchip-emmc.c | 8 +-------
>>  1 file changed, 1 insertion(+), 7 deletions(-)
>>
>> diff --git a/drivers/phy/phy-rockchip-emmc.c
>> b/drivers/phy/phy-rockchip-emmc.c
>> index 0fce7359d468..188e4c387ba8 100644
>> --- a/drivers/phy/phy-rockchip-emmc.c
>> +++ b/drivers/phy/phy-rockchip-emmc.c
>> @@ -227,8 +227,6 @@ static int rockchip_emmc_phy_power_off(struct phy
>> *phy)
>>  static int rockchip_emmc_phy_power_on(struct phy *phy)
>>  {
>
>
> I saw the cleanup for power_off is done on [patch 9/11]
>
> shouldn't be in this patch? :)

Yeah, I tried to, but then I realized that I couldn't split that out
too easily because the previous patch touched the same code.

...but actually, reordering things solves all the problems so I've done that.


-Doug

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web