[LTP] [PATCH 5/5] API/cgroup: Use __func__ in tst_cgroup_require

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


Required by checkpatch.pl.

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

diff --git a/lib/tst_cgroup.c b/lib/tst_cgroup.c
index c22f5b32c..7c4de34c6 100644
--- a/lib/tst_cgroup.c
+++ b/lib/tst_cgroup.c
@@ -609,10 +609,9 @@ void tst_cgroup_require(const char *const ctrl_name,
 	if (!options)
 		options = &default_opts;
 
-	if (ctrl->we_require_it) {
-		tst_res(TWARN, "Duplicate tst_cgroup_require(%s, )",
-			ctrl->ctrl_name);
-	}
+	if (ctrl->we_require_it)
+		tst_res(TWARN, "Duplicate %s(%s, )", __func__, ctrl->ctrl_name);
+
 	ctrl->we_require_it = 1;
 
 	if (ctrl->ctrl_root)
-- 
2.34.0



More information about the ltp mailing list