From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756058AbbCCM6B (ORCPT ); Tue, 3 Mar 2015 07:58:01 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:48205 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751535AbbCCM6A (ORCPT ); Tue, 3 Mar 2015 07:58:00 -0500 Message-ID: <54F5AFD4.2080800@ti.com> Date: Tue, 3 Mar 2015 14:57:56 +0200 From: Roger Quadros User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Axel Lin , Kishon Vijay Abraham I CC: Vignesh R , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] phy: ti-pipe3: Simplify ti_pipe3_dpll_wait_lock implementation References: <1425384295.23394.0.camel@phoenix> In-Reply-To: <1425384295.23394.0.camel@phoenix> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/03/15 14:04, Axel Lin wrote: > Code simplification. No functional change. > > Signed-off-by: Axel Lin Acked-by: Roger Quadros cheers, -roger > --- > drivers/phy/phy-ti-pipe3.c | 10 +++------- > 1 file changed, 3 insertions(+), 7 deletions(-) > > diff --git a/drivers/phy/phy-ti-pipe3.c b/drivers/phy/phy-ti-pipe3.c > index 95c88f9..ed72b0d 100644 > --- a/drivers/phy/phy-ti-pipe3.c > +++ b/drivers/phy/phy-ti-pipe3.c > @@ -165,15 +165,11 @@ static int ti_pipe3_dpll_wait_lock(struct ti_pipe3 *phy) > cpu_relax(); > val = ti_pipe3_readl(phy->pll_ctrl_base, PLL_STATUS); > if (val & PLL_LOCK) > - break; > + return 0; > } while (!time_after(jiffies, timeout)); > > - if (!(val & PLL_LOCK)) { > - dev_err(phy->dev, "DPLL failed to lock\n"); > - return -EBUSY; > - } > - > - return 0; > + dev_err(phy->dev, "DPLL failed to lock\n"); > + return -EBUSY; > } > > static int ti_pipe3_dpll_program(struct ti_pipe3 *phy) >