Return-Path: Received: from galahad.ideasonboard.com ([185.26.127.97]:57875 "EHLO galahad.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933600AbcKKWmQ (ORCPT ); Fri, 11 Nov 2016 17:42:16 -0500 From: Laurent Pinchart To: Niklas =?ISO-8859-1?Q?S=F6derlund?= Cc: Geert Uytterhoeven , Linus Walleij , linux-renesas-soc@vger.kernel.org, linux-gpio@vger.kernel.org, Niklas =?ISO-8859-1?Q?S=F6derlund?= Subject: Re: [PATCHv2 3/6] pinctrl: sh-pfc: r8a7795: Simplify get bias logic Date: Sat, 12 Nov 2016 00:42:19 +0200 Message-ID: <1742469.h1uB4hWBoE@avalon> In-Reply-To: <20161111203021.3384-4-niklas.soderlund@ragnatech.se> References: <20161111203021.3384-1-niklas.soderlund@ragnatech.se> <20161111203021.3384-4-niklas.soderlund@ragnatech.se> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" Sender: linux-renesas-soc-owner@vger.kernel.org List-ID: Hi Niklas, Thank you for the patch. On Friday 11 Nov 2016 21:30:18 Niklas S=F6derlund wrote: > From: Niklas S=F6derlund >=20 > The last else statement is missing braces and there indentation level= > can be reduced. >=20 > Suggested-by: Laurent Pinchart > Signed-off-by: Niklas S=F6derlund Reviewed-by: Laurent Pinchart > --- > drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) >=20 > diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7795.c > b/drivers/pinctrl/sh-pfc/pfc-r8a7795.c index 2e8cc2a..6c58563 100644 > --- a/drivers/pinctrl/sh-pfc/pfc-r8a7795.c > +++ b/drivers/pinctrl/sh-pfc/pfc-r8a7795.c > @@ -5367,13 +5367,12 @@ static unsigned int r8a7795_pinmux_get_bias(s= truct > sh_pfc *pfc, reg =3D pullups[pin].reg; > =09bit =3D BIT(pullups[pin].bit); >=20 > -=09if (sh_pfc_read_reg(pfc, PUEN + reg, 32) & bit) { > -=09=09if (sh_pfc_read_reg(pfc, PUD + reg, 32) & bit) > -=09=09=09return PIN_CONFIG_BIAS_PULL_UP; > -=09=09else > -=09=09=09return PIN_CONFIG_BIAS_PULL_DOWN; > -=09} else > +=09if (!(sh_pfc_read_reg(pfc, PUEN + reg, 32) & bit)) > =09=09return PIN_CONFIG_BIAS_DISABLE; > +=09else if (sh_pfc_read_reg(pfc, PUD + reg, 32) & bit) > +=09=09return PIN_CONFIG_BIAS_PULL_UP; > +=09else > +=09=09return PIN_CONFIG_BIAS_PULL_DOWN; > } >=20 > static void r8a7795_pinmux_set_bias(struct sh_pfc *pfc, unsigned int= pin, --=20 Regards, Laurent Pinchart