提交 738afbf1 编写于 作者: W Wang ShaoBo 提交者: Zheng Zengkai

tracing/osnoise: Fix compile warning in function start_kthread

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I4G64B
CVE: NA

-------------------------------------------------

This patch fixes following compile warning:

---------------------- [WARNING] checkbuild_arm64 ----------------------

build warning: arm64, allmodconfig

kernel/trace/trace_osnoise.c: In function ‘start_kthread’:
kernel/trace/trace_osnoise.c:1674:8: warning: ‘main’ is usually a function [-Wmain]
  void *main = osnoise_main;
        ^~~~
---------------------- [WARNING] checkbuild_x86_64 ----------------------

build warning: x86_64, allmodconfig

kernel/trace/trace_osnoise.c: In function ‘start_kthread’:
kernel/trace/trace_osnoise.c:1674:8: warning: ‘main’ is usually a function [-Wmain]
  void *main = osnoise_main;
        ^~~~
Signed-off-by: NWang ShaoBo <bobo.shaobowang@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 2f5aafc8
......@@ -1671,17 +1671,17 @@ static void stop_per_cpu_kthreads(void)
static int start_kthread(unsigned int cpu)
{
struct task_struct *kthread;
void *main = osnoise_main;
void *func_main = osnoise_main;
char comm[24];
if (timerlat_enabled()) {
snprintf(comm, 24, "timerlat/%d", cpu);
main = timerlat_main;
func_main = timerlat_main;
} else {
snprintf(comm, 24, "osnoise/%d", cpu);
}
kthread = kthread_create_on_cpu(main, NULL, cpu, comm);
kthread = kthread_create_on_cpu(func_main, NULL, cpu, comm);
if (IS_ERR(kthread)) {
pr_err(BANNER "could not start sampling thread\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册