[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180531064535.GA53792@lkp-ib04>
Date: Thu, 31 May 2018 14:45:35 +0800
From: kbuild test robot <fengguang.wu@...el.com>
To: Joel Fernandes <joelaf@...gle.com>
Cc: kbuild-all@...org, linux-kernel@...r.kernel.org,
kernel-team@...roid.com,
"Joel Fernandes (Google)" <joel@...lfernandes.org>,
Boqun Feng <boqun.feng@...il.com>,
Byungchul Park <byungchul.park@....com>,
Erick Reyes <erickreyes@...gle.com>,
Ingo Molnar <mingo@...hat.com>,
Julia Cartwright <julia@...com>,
linux-kselftest@...r.kernel.org,
Masami Hiramatsu <mhiramat@...nel.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Namhyung Kim <namhyung@...nel.org>,
Paul McKenney <paulmck@...ux.vnet.ibm.com>,
Peter Zijlstra <peterz@...radead.org>,
Shuah Khan <shuah@...nel.org>,
Steven Rostedt <rostedt@...dmis.org>,
Thomas Glexiner <tglx@...utronix.de>,
Todd Kjos <tkjos@...gle.com>,
Tom Zanussi <tom.zanussi@...ux.intel.com>
Subject: [PATCH] kselftests: fix ptr_ret.cocci warnings
From: kbuild test robot <fengguang.wu@...el.com>
lib/test_atomic_sections.c:66:1-3: WARNING: PTR_ERR_OR_ZERO can be used
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
Generated by: scripts/coccinelle/api/ptr_ret.cocci
Fixes: 3b0e47f0ade1 ("kselftests: Add tests for the preemptoff and irqsoff tracers")
CC: Joel Fernandes (Google) <joel@...lfernandes.org>
Signed-off-by: kbuild test robot <fengguang.wu@...el.com>
---
test_atomic_sections.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
--- a/lib/test_atomic_sections.c
+++ b/lib/test_atomic_sections.c
@@ -63,10 +63,7 @@ static int __init atomic_sect_init(void)
snprintf(task_name, 50, "%s dis test", atomic_mode);
test_task = kthread_run((void*)atomic_sect_run, NULL, task_name);
- if (IS_ERR(test_task))
- return PTR_ERR(test_task);
-
- return 0;
+ return PTR_ERR_OR_ZERO(test_task);
}
static void __exit atomic_sect_exit(void)
Powered by blists - more mailing lists