]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
MIPS: init: move externs to header file
authorYanteng Si <siyanteng@loongson.cn>
Thu, 7 Jan 2021 03:06:45 +0000 (11:06 +0800)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Thu, 7 Jan 2021 16:12:51 +0000 (17:12 +0100)
This commit fixes the following checkpatch warnings:

    WARNING: externs should be avoided in .c files

    This is a warning for placing declarations in a ".c" file.
    This fix removes the declaration in ".c" and adds it to
    the common header file.

Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
Reviewed-by: Huacai Chen <chenhuacai@kernel.org>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/include/asm/traps.h
arch/mips/loongson2ef/common/init.c
arch/mips/loongson64/init.c
arch/mips/mti-malta/malta-init.c
arch/mips/pistachio/init.c

index 6a0864bb604dc7957c26a87a87263e358d25b735..6aa8f126a43d89b3e71747a4ce3a295c798025c4 100644 (file)
@@ -24,6 +24,7 @@ extern void (*board_ebase_setup)(void);
 extern void (*board_cache_error_setup)(void);
 
 extern int register_nmi_notifier(struct notifier_block *nb);
+extern char except_vec_nmi[];
 
 #define nmi_notifier(fn, pri)                                          \
 ({                                                                     \
index 088aa56d4ed152f355608db8ad675d11820c05bd..7797359359e400b5d70369f128a8326039bf0849 100644 (file)
@@ -19,7 +19,6 @@ unsigned long __maybe_unused _loongson_addrwincfg_base;
 static void __init mips_nmi_setup(void)
 {
        void *base;
-       extern char except_vec_nmi[];
 
        base = (void *)(CAC_BASE + 0x380);
        memcpy(base, except_vec_nmi, 0x80);
index 87a4569972aeb19a427cf22c62d533231d3c7b64..cfa788bca871909fca3d72b567ea3be5008a2f18 100644 (file)
@@ -25,7 +25,6 @@ u32 node_id_offset;
 static void __init mips_nmi_setup(void)
 {
        void *base;
-       extern char except_vec_nmi[];
 
        base = (void *)(CAC_BASE + 0x380);
        memcpy(base, except_vec_nmi, 0x80);
index 893af377aacc907bddb3285d96bfc1b482c729ce..b03cac5fdc02e310fc1136b33ac90628e76c5953 100644 (file)
@@ -90,7 +90,6 @@ static void __init console_config(void)
 static void __init mips_nmi_setup(void)
 {
        void *base;
-       extern char except_vec_nmi[];
 
        base = cpu_has_veic ?
                (void *)(CAC_BASE + 0xa80) :
index ddc0e84c13f5e0f3c6cdbe341baf04fa45aaf3b5..8e83262e9da85bd894a96b1e5183e3af62e2c883 100644 (file)
@@ -83,7 +83,6 @@ phys_addr_t mips_cdmm_phys_base(void)
 static void __init mips_nmi_setup(void)
 {
        void *base;
-       extern char except_vec_nmi[];
 
        base = cpu_has_veic ?
                (void *)(CAC_BASE + 0xa80) :