Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1608531
| From | Andrew Lunn <andrew@lunn.ch> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3 1/4] gpio: mvebu: Add limited PWM support |
| Date | 2017-03-24 16:20 +0100 |
| Message-ID | <tozaq-3qf-15@gated-at.bofh.it> (permalink) |
| References | <toyen-2LK-59@gated-at.bofh.it> <toyen-2LK-57@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> + 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
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v3 1/4] gpio: mvebu: Add limited PWM support Ralph Sennhauser <ralph.sennhauser@gmail.com> - 2017-03-24 15:20 +0100 Re: [PATCH v3 1/4] gpio: mvebu: Add limited PWM support Andrew Lunn <andrew@lunn.ch> - 2017-03-24 15:30 +0100 Re: [PATCH v3 1/4] gpio: mvebu: Add limited PWM support Andrew Lunn <andrew@lunn.ch> - 2017-03-24 16:20 +0100
csiph-web