lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202408291419.auyiQ03C-lkp@intel.com>
Date: Thu, 29 Aug 2024 14:18:56 +0800
From: kernel test robot <lkp@...el.com>
To: "Steven Rostedt (Google)" <rostedt@...dmis.org>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
	linux-kernel@...r.kernel.org
Subject: kernel/trace/trace.c:2102:19: error: unused function
 'run_tracer_selftest'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   d5d547aa7b51467b15d9caa86b116f8c2507c72a
commit: e8352cf5778c53b80fdcee086278b2048ddb8f98 tracing: Move setting of tracing_selftest_running out of register_tracer()
date:   1 year, 3 months ago
config: x86_64-sof-customedconfig-amd-defconfig (https://download.01.org/0day-ci/archive/20240829/202408291419.auyiQ03C-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240829/202408291419.auyiQ03C-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408291419.auyiQ03C-lkp@intel.com/

All errors (new ones prefixed by >>):

>> kernel/trace/trace.c:2102:19: error: unused function 'run_tracer_selftest' [-Werror,-Wunused-function]
    2102 | static inline int run_tracer_selftest(struct tracer *type)
         |                   ^~~~~~~~~~~~~~~~~~~
   1 error generated.


vim +/run_tracer_selftest +2102 kernel/trace/trace.c

e8352cf5778c53 Steven Rostedt (Google   2023-05-28  2054) 
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2055) static __init int init_trace_selftests(void)
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2056) {
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2057) 	struct trace_selftests *p, *n;
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2058) 	struct tracer *t, **last;
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2059) 	int ret;
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2060) 
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2061) 	selftests_can_run = true;
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2062) 
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2063) 	mutex_lock(&trace_types_lock);
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2064) 
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2065) 	if (list_empty(&postponed_selftests))
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2066) 		goto out;
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2067) 
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2068) 	pr_info("Running postponed tracer tests:\n");
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2069) 
78041c0c9e935d Steven Rostedt (VMware   2020-02-20  2070) 	tracing_selftest_running = true;
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2071) 	list_for_each_entry_safe(p, n, &postponed_selftests, list) {
6fc2171c5c0367 Anders Roxell            2018-11-30  2072  		/* This loop can take minutes when sanitizers are enabled, so
6fc2171c5c0367 Anders Roxell            2018-11-30  2073  		 * lets make sure we allow RCU processing.
6fc2171c5c0367 Anders Roxell            2018-11-30  2074  		 */
6fc2171c5c0367 Anders Roxell            2018-11-30  2075  		cond_resched();
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2076) 		ret = run_tracer_selftest(p->type);
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2077) 		/* If the test fails, then warn and remove from available_tracers */
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2078) 		if (ret < 0) {
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2079) 			WARN(1, "tracer: %s failed selftest, disabling\n",
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2080) 			     p->type->name);
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2081) 			last = &trace_types;
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2082) 			for (t = trace_types; t; t = t->next) {
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2083) 				if (t == p->type) {
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2084) 					*last = t->next;
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2085) 					break;
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2086) 				}
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2087) 				last = &t->next;
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2088) 			}
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2089) 		}
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2090) 		list_del(&p->list);
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2091) 		kfree(p);
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2092) 	}
78041c0c9e935d Steven Rostedt (VMware   2020-02-20  2093) 	tracing_selftest_running = false;
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2094) 
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2095)  out:
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2096) 	mutex_unlock(&trace_types_lock);
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2097) 
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2098) 	return 0;
9afecfbb95198e Steven Rostedt (VMware   2017-03-24  2099) }
b9ef0326c05a00 Steven Rostedt           2017-05-17  2100  core_initcall(init_trace_selftests);
f4e781c0a89d58 Steven Rostedt (Red Hat  2013-03-07  2101) #else
f4e781c0a89d58 Steven Rostedt (Red Hat  2013-03-07 @2102) static inline int run_tracer_selftest(struct tracer *type)
f4e781c0a89d58 Steven Rostedt (Red Hat  2013-03-07  2103) {
f4e781c0a89d58 Steven Rostedt (Red Hat  2013-03-07  2104) 	return 0;
0d5c6e1c19bab8 Steven Rostedt           2012-11-01  2105  }
e8352cf5778c53 Steven Rostedt (Google   2023-05-28  2106) static inline int do_run_tracer_selftest(struct tracer *type)
e8352cf5778c53 Steven Rostedt (Google   2023-05-28  2107) {
e8352cf5778c53 Steven Rostedt (Google   2023-05-28  2108) 	return 0;
e8352cf5778c53 Steven Rostedt (Google   2023-05-28  2109) }
f4e781c0a89d58 Steven Rostedt (Red Hat  2013-03-07  2110) #endif /* CONFIG_FTRACE_STARTUP_TEST */
0d5c6e1c19bab8 Steven Rostedt           2012-11-01  2111  

:::::: The code at line 2102 was first introduced by commit
:::::: f4e781c0a89d5810729772290441ac7d61f321ec tracing: Move the tracing selftest code into its own function

:::::: TO: Steven Rostedt (Red Hat) <srostedt@...hat.com>
:::::: CC: Steven Rostedt <rostedt@...dmis.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ