From 2899bda5e7fcf77b69727b03d0ab8acd9d25a29f Mon Sep 17 00:00:00 2001 From: Oliver O'Halloran Date: Thu, 14 Nov 2019 13:35:05 +1100 Subject: [PATCH] include/cpu: Move __nomcount attribute When compiling under clang we get the following warning: include/cpu.h:156:15: warning: 'no_instrument_function' attribute only applies to functions [-Wignored-attributes] extern struct __nomcount cpu_thread *find_cpu_by_pir_nomcount(u32 pir); ^ include/compiler.h:27:36: note: expanded from macro '__nomcount' ^ This seems to be due to the attribute being applied to the function's return type rather than to the function itself, so move __nomcount to along the line so it's not part of the return type. Signed-off-by: Oliver O'Halloran --- core/cpu.c | 2 +- include/cpu.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/cpu.c b/core/cpu.c index d0e4cdc1c038..99d016f0d90a 100644 --- a/core/cpu.c +++ b/core/cpu.c @@ -739,7 +739,7 @@ struct cpu_thread *find_cpu_by_pir(u32 pir) return &cpu_stacks[pir].cpu; } -struct __nomcount cpu_thread *find_cpu_by_pir_nomcount(u32 pir) +struct cpu_thread __nomcount *find_cpu_by_pir_nomcount(u32 pir) { if (pir > cpu_max_pir) return NULL; diff --git a/include/cpu.h b/include/cpu.h index cda78644dfe9..5fdcc9862ac7 100644 --- a/include/cpu.h +++ b/include/cpu.h @@ -153,7 +153,7 @@ extern struct cpu_thread *find_cpu_by_server(u32 server_no); extern struct cpu_thread *find_cpu_by_pir(u32 pir); /* Used for lock internals to avoid re-entrancy */ -extern struct __nomcount cpu_thread *find_cpu_by_pir_nomcount(u32 pir); +extern struct cpu_thread __nomcount *find_cpu_by_pir_nomcount(u32 pir); extern struct dt_node *get_cpu_node(u32 pir);