Thread (11 messages) 11 messages, 2 authors, 2017-03-27

Re: [PATCH v3 1/4] gpio: mvebu: Add limited PWM support

From: Andrew Lunn <andrew@lunn.ch>
Date: 2017-03-24 15:10:02
Also in: linux-arm-kernel, linux-gpio, linux-pwm, lkml

+	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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help