Skip to content

Commit

Permalink
MIPS: init: move externs to header file
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yanteng Si authored and tsbogend committed Jan 7, 2021
1 parent fdd85e0 commit 3b31bb6
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 4 deletions.
1 change: 1 addition & 0 deletions arch/mips/include/asm/traps.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
({ \
Expand Down
1 change: 0 additions & 1 deletion arch/mips/loongson2ef/common/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion arch/mips/loongson64/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion arch/mips/mti-malta/malta-init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) :
Expand Down
1 change: 0 additions & 1 deletion arch/mips/pistachio/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) :
Expand Down

0 comments on commit 3b31bb6

Please sign in to comment.