lkml.org 
[lkml]   [2021]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] smp: kernel/panic.c - silence warnings
From
Date


Le 17/03/2021 à 10:49, Ingo Molnar a écrit :
>
> * He Ying <heying24@huawei.com> wrote:
>
>> We found these warnings in kernel/panic.c by using sparse tool:
>> warning: symbol 'panic_smp_self_stop' was not declared.
>> warning: symbol 'nmi_panic_self_stop' was not declared.
>> warning: symbol 'crash_smp_send_stop' was not declared.
>>
>> To avoid them, add declarations for these three functions in
>> include/linux/smp.h.
>>
>> Reported-by: Hulk Robot <hulkci@huawei.com>
>> Signed-off-by: He Ying <heying24@huawei.com>
>> ---
>> V1->V2:
>> - fix some misspellings
>>
>> include/linux/smp.h | 8 ++++++++
>> 1 file changed, 8 insertions(+)
>>
>> diff --git a/include/linux/smp.h b/include/linux/smp.h
>> index 70c6f6284dcf..27008a1c8111 100644
>> --- a/include/linux/smp.h
>> +++ b/include/linux/smp.h
>> @@ -50,6 +50,14 @@ extern unsigned int total_cpus;
>> int smp_call_function_single(int cpuid, smp_call_func_t func, void *info,
>> int wait);
>>
>> +/*
>> + * Cpus stopping functions in panic. All have default weak definitions.
>> + * Architecture-dependent code may override them.
>> + */
>> +void panic_smp_self_stop(void);
>> +void nmi_panic_self_stop(struct pt_regs *regs);
>> +void crash_smp_send_stop(void);
>

What do you mean ? 'extern' prototype is pointless for function prototypes and deprecated, no new
function prototypes should be added with the 'extern' keyword.

checkpatch.pl tells you: "extern prototypes should be avoided in .h files"

Christophe

\
 
 \ /
  Last update: 2021-03-17 12:02    [W:0.094 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site