Skip to contentSkip to conversation

staging: greybus: Adding missing brackets into if..else block.

PATCH Superseded Julio Faracco 2 participants 2 messages Sep 4, 2019 – Sep 5, 2019

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: greybus: Adding missing brackets into if..else block.

Inside a block of if..else conditional, else structure does not contain brackets. This is not following regular policies of good coding style. All parts of this conditional blocks should respect brackets inclusion.

---
 drivers/staging/greybus/tools/loopback_test.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/greybus/tools/loopback_test.c +2 -1
index ba6f905f2..d46721502 100644
@@ -801,8 +801,9 @@ static void prepare_devices(struct loopback_test *t)
 			write_sysfs_val(t->devices[i].sysfs_entry,
 					"outstanding_operations_max",
 					t->async_outstanding_operations);
-		} else
+		} else {
 			write_sysfs_val(t->devices[i].sysfs_entry, "async", 0);
+		}
 	}
 }
 
Signature · 1 line
2.20.1
maintainer
#1 lore raw
Quoted 2 lines · Julio Faracco

Inside a block of if..else conditional, else structure does not contain brackets. This is not following regular policies of good coding style.

s/good/kernel/ ?

Quoted 1 line

All parts of this conditional blocks should respect brackets inclusion.

Did you check that there aren't further instances of this style issue in this file? If so, please them all in one go.

Also please include greybus component you are changing in your subject prefix:

staging: greybus: loopback_test: ...

Quoted 10 lines
---
 drivers/staging/greybus/tools/loopback_test.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/greybus/tools/loopback_test.c +0 -0
index ba6f905f2..d46721502 100644

drivers/staging/greybus/tools/loopback_test.c static void prepare_devices(struct loopback_test *t) · line 808

Quoted 9 lines
drivers/staging/greybus/tools/loopback_test.c +2 -1
@@ -801,8 +801,9 @@ static void prepare_devices(struct loopback_test *t)
 			write_sysfs_val(t->devices[i].sysfs_entry,
 					"outstanding_operations_max",
 					t->async_outstanding_operations);
-		} else
+		} else {
 			write_sysfs_val(t->devices[i].sysfs_entry, "async", 0);
+		}
 	}
 }

Johan