[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170324142854.GJ28518@lunn.ch>
Date: Fri, 24 Mar 2017 15:28:54 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Ralph Sennhauser <ralph.sennhauser@...il.com>
Cc: linux-gpio@...r.kernel.org, Imre Kaloz <kaloz@...nwrt.org>,
Thierry Reding <thierry.reding@...il.com>,
Linus Walleij <linus.walleij@...aro.org>,
Alexandre Courbot <gnurou@...il.com>,
Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Jason Cooper <jason@...edaemon.net>,
Gregory Clement <gregory.clement@...e-electrons.com>,
Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>,
Russell King <linux@...linux.org.uk>,
linux-pwm@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v3 1/4] gpio: mvebu: Add limited PWM support
> + if (val < state->duty_cycle)
> + state->period = 1;
> + else {
> + val -= state->duty_cycle;
> + if (val > UINT_MAX)
> + state->period = UINT_MAX;
> + else if (val)
> + state->period = val;
> + else
> + state->period = 1;
> + }
Hi Ralph
The coding style guide says that if one side of an if else clause has
{}, the other side must as well, even if it is a single statement.
Andrew
Powered by blists - more mailing lists