From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3831C433DB for ; Tue, 16 Mar 2021 08:42:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6130864FFC for ; Tue, 16 Mar 2021 08:42:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234343AbhCPImX (ORCPT ); Tue, 16 Mar 2021 04:42:23 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:13627 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235450AbhCPImK (ORCPT ); Tue, 16 Mar 2021 04:42:10 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4F06Dc1Yj8z17LwQ; Tue, 16 Mar 2021 16:40:16 +0800 (CST) Received: from huawei.com (10.67.174.47) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.498.0; Tue, 16 Mar 2021 16:42:02 +0800 From: He Ying To: , , , , , , CC: , Subject: [PATCH v2] smp: kernel/panic.c - silence warnings Date: Tue, 16 Mar 2021 04:41:50 -0400 Message-ID: <20210316084150.75201-1-heying24@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.174.47] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: He Ying --- 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); + /* * Call a function on all processors */ -- 2.17.1