diff mbox series

[12/29] Input: MT - Avoid comma separated statements

Message ID 02cb394f8c305473c1a783a5ea8425de79fe0ec1.1598331149.git.joe@perches.com (mailing list archive)
State Accepted
Commit 9b5fbad1dcee0607300d08f888c71c8ef97a06a0
Headers show
Series treewide: Convert comma separated statements | expand

Commit Message

Joe Perches Aug. 25, 2020, 4:56 a.m. UTC
Use semicolons and braces.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/input/input-mt.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

Comments

Dmitry Torokhov Aug. 25, 2020, 5:07 p.m. UTC | #1
On Mon, Aug 24, 2020 at 09:56:09PM -0700, Joe Perches wrote:
> Use semicolons and braces.
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Applied, thank you.
diff mbox series

Patch

diff --git a/drivers/input/input-mt.c b/drivers/input/input-mt.c
index f699538bdac4..44fe6f2f063c 100644
--- a/drivers/input/input-mt.c
+++ b/drivers/input/input-mt.c
@@ -323,11 +323,14 @@  static int adjust_dual(int *begin, int step, int *end, int eq, int mu)
 	p = begin + step;
 	s = p == end ? f + 1 : *p;
 
-	for (; p != end; p += step)
-		if (*p < f)
-			s = f, f = *p;
-		else if (*p < s)
+	for (; p != end; p += step) {
+		if (*p < f) {
+			s = f;
+			f = *p;
+		} else if (*p < s) {
 			s = *p;
+		}
+	}
 
 	c = (f + s + 1) / 2;
 	if (c == 0 || (c > mu && (!eq || mu > 0)))