[LTP] [PATCH 1/5] API/cgroup: Whitespace fixes

Richard Palethorpe rpalethorpe@suse.com
Tue Dec 14 11:36:41 CET 2021


Reduce make check noise

Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
---
 lib/tst_cgroup.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/lib/tst_cgroup.c b/lib/tst_cgroup.c
index 61cc02fa7..2dcfbc8ff 100644
--- a/lib/tst_cgroup.c
+++ b/lib/tst_cgroup.c
@@ -199,7 +199,8 @@ static struct cgroup_ctrl controllers[] = {
 static const struct tst_cgroup_opts default_opts = { 0 };
 
 /* We should probably allow these to be set in environment
- * variables */
+ * variables
+ */
 static const char *ltp_cgroup_dir = "ltp";
 static const char *ltp_cgroup_drain_dir = "drain";
 static char test_cgroup_dir[NAME_MAX + 1];
@@ -798,7 +799,8 @@ void tst_cgroup_cleanup(void)
 			continue;
 
 		/* This probably does not result in the CGroup root
-		 * being destroyed */
+		 * being destroyed
+		 */
 		if (umount2(root->mnt_path, MNT_DETACH))
 			continue;
 
@@ -817,7 +819,7 @@ clear_data:
 	memset(roots, 0, sizeof(roots));
 }
 
-__attribute__ ((nonnull (1)))
+__attribute__((nonnull(1)))
 static void cgroup_group_init(struct tst_cgroup_group *const cg,
 			      const char *const group_name)
 {
@@ -832,7 +834,7 @@ static void cgroup_group_init(struct tst_cgroup_group *const cg,
 	strcpy(cg->group_name, group_name);
 }
 
-__attribute__((nonnull (2, 3)))
+__attribute__((nonnull(2, 3)))
 static void cgroup_group_add_dir(const struct tst_cgroup_group *const parent,
 				 struct tst_cgroup_group *const cg,
 				 struct cgroup_dir *const dir)
@@ -856,7 +858,8 @@ static void cgroup_group_add_dir(const struct tst_cgroup_group *const parent,
 				   "+%s", ctrl->ctrl_name);
 	}
 
-	for (i = 0; cg->dirs[i]; i++);
+	for (i = 0; cg->dirs[i]; i++)
+		;
 	cg->dirs[i] = dir;
 }
 
@@ -923,7 +926,7 @@ static const struct cgroup_file *cgroup_file_find(const char *const file,
 	memcpy(ctrl_name, file_name, len);
 	ctrl_name[len] = '\0';
 
-        ctrl = cgroup_find_ctrl(ctrl_name);
+	ctrl = cgroup_find_ctrl(ctrl_name);
 
 	if (!ctrl) {
 		tst_brk_(file, lineno, TBROK,
-- 
2.34.0



More information about the ltp mailing list