From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Wed, 6 Mar 2019 13:41:39 +0100 Subject: [U-Boot] [PATCH v3 6/6] i2c: rcar_i2c: Move FSDA check to rcar_i2c_recover In-Reply-To: <20190306104613.8153-6-ismael.luceno@silicon-gears.com> References: <20190306104613.8153-1-ismael.luceno@silicon-gears.com> <20190306104613.8153-6-ismael.luceno@silicon-gears.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 3/6/19 11:46 AM, Ismael Luceno Cortes wrote: > Cosmetic change. Any call to the recover function would need to do the > same check afterwards, so it's sensible to make it part of the function. > > Signed-off-by: Ismael Luceno Reviewed-by: Marek Vasut > --- > drivers/i2c/rcar_i2c.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/drivers/i2c/rcar_i2c.c b/drivers/i2c/rcar_i2c.c > index 78ef8acacc..8fe0aadffa 100644 > --- a/drivers/i2c/rcar_i2c.c > +++ b/drivers/i2c/rcar_i2c.c > @@ -81,12 +81,13 @@ static int rcar_i2c_finish(struct udevice *dev) > return ret; > } > > -static void rcar_i2c_recover(struct udevice *dev) > +static int rcar_i2c_recover(struct udevice *dev) > { > struct rcar_i2c_priv *priv = dev_get_priv(dev); > u32 mcr = RCAR_I2C_ICMCR_MDBS | RCAR_I2C_ICMCR_OBPC; > u32 mcra = mcr | RCAR_I2C_ICMCR_FSDA; > int i; > + u32 mstat; Nit: would be nice to keep these variables sorted in reverse xmas tree. -- Best regards, Marek Vasut