[PATCH 1/2] mem/min_free_kbytes: fix comment typo and whitespace alignment

Sachin Sant <[email protected]>
Newsgroups gmane.linux.ltp
Message-ID <[email protected]>
Fix the typo '%2 MemTotal' -> '2% MemTotal' in the file header comment.
Remove spurious leading spaces from continuation lines in tst_res()
calls and remove unnecessary braces around a single-statement if body,
bringing the file in line with LTP coding style.

Signed-off-by: Sachin Sant <[email protected]>
---
 testcases/kernel/mem/tunable/min_free_kbytes.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/testcases/kernel/mem/tunable/min_free_kbytes.c b/testcases/kernel/mem/tunable/min_free_kbytes.c
index bdc9126c2..b1d00e453 100644
--- a/testcases/kernel/mem/tunable/min_free_kbytes.c
+++ b/testcases/kernel/mem/tunable/min_free_kbytes.c
@@ -17,7 +17,7 @@
  *
  * 1. default min_free_kbytes with all ``overcommit_memory`` policy
  * 2. 2x default value with all ``overcommit_memory`` policy
- * 3. 5% of MemFree or %2 MemTotal with all ``overcommit_memory`` policy
+ * 3. 5% of MemFree or 2% MemTotal with all ``overcommit_memory`` policy
  *
  * [References]
  *
@@ -114,7 +114,7 @@ static void test_tune(unsigned long overcommit_policy)
 		if (overcommit_policy == 2) {
 			if (!WIFEXITED(status) || WEXITSTATUS(status) != 0)
 				tst_res(TFAIL, "child unexpectedly failed: %s",
-					 tst_strstatus(status));
+					tst_strstatus(status));
 		} else if (overcommit_policy == 1) {
 			if (!WIFSIGNALED(status) || WTERMSIG(status) != SIGKILL)
 #ifdef TST_ABI32
@@ -122,20 +122,19 @@ static void test_tune(unsigned long overcommit_policy)
 				if (total_mem < 3145728UL)
 #endif
 					tst_res(TFAIL, "child unexpectedly failed: %s",
-						 tst_strstatus(status));
+						tst_strstatus(status));
 #ifdef TST_ABI32
 				/* in 32-bit system, a process allocate about 3Gb memory at most */
 				else
 					tst_res(TINFO, "Child can't allocate "
-						 ">3Gb memory in 32bit system");
+						">3Gb memory in 32bit system");
 			}
 #endif
 		} else {
 			if (WIFEXITED(status)) {
-				if (WEXITSTATUS(status) != 0) {
+				if (WEXITSTATUS(status) != 0)
 					tst_res(TFAIL, "child unexpectedly failed: %s",
 						tst_strstatus(status));
-				}
 			} else if (!WIFSIGNALED(status) ||
 				   WTERMSIG(status) != SIGKILL) {
 				tst_res(TFAIL, "child unexpectedly failed: %s",
@@ -182,7 +181,7 @@ static void check_monitor(void)
 
 		if (memfree < tune) {
 			tst_res(TINFO, "MemFree is %lu kB, "
-				 "min_free_kbytes is %lu kB", memfree, tune);
+				"min_free_kbytes is %lu kB", memfree, tune);
 			tst_res(TFAIL, "MemFree < min_free_kbytes");
 		}
 
-- 
2.39.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.