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 3AA7BC433DB for ; Tue, 16 Mar 2021 04:09:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 03BE564FFD for ; Tue, 16 Mar 2021 04:09:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230024AbhCPEIx (ORCPT ); Tue, 16 Mar 2021 00:08:53 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:13542 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229894AbhCPEIl (ORCPT ); Tue, 16 Mar 2021 00:08:41 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4F008S5cBLzPjr7; Tue, 16 Mar 2021 12:06:16 +0800 (CST) Received: from huawei.com (10.67.174.47) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.498.0; Tue, 16 Mar 2021 12:08:30 +0800 From: He Ying To: , , , , , , CC: , Subject: [PATCH] smp: kernel/panic.c - silence warnings Date: Tue, 16 Mar 2021 00:08:19 -0400 Message-ID: <20210316040819.29085-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 --- include/linux/smp.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/linux/smp.h b/include/linux/smp.h index 70c6f6284dcf..861a253cc179 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 definations. + * Architecure 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