Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935768AbdCXPKC (ORCPT ); Fri, 24 Mar 2017 11:10:02 -0400 Received: from vps0.lunn.ch ([178.209.37.122]:60065 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751712AbdCXPJy (ORCPT ); Fri, 24 Mar 2017 11:09:54 -0400 Date: Fri, 24 Mar 2017 15:28:54 +0100 From: Andrew Lunn To: Ralph Sennhauser Cc: linux-gpio@vger.kernel.org, Imre Kaloz , Thierry Reding , Linus Walleij , Alexandre Courbot , Rob Herring , Mark Rutland , Jason Cooper , Gregory Clement , Sebastian Hesselbarth , Russell King , linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v3 1/4] gpio: mvebu: Add limited PWM support Message-ID: <20170324142854.GJ28518@lunn.ch> References: <20170324141815.7252-1-ralph.sennhauser@gmail.com> <20170324141815.7252-2-ralph.sennhauser@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170324141815.7252-2-ralph.sennhauser@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 403 Lines: 18 > + 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