Re: [PATCH 21/21] fs: Move prototype declaration to appropriate header file

From: Andrew Morton
Date: Tue Feb 11 2014 - 17:36:34 EST


On Sun, 9 Feb 2014 19:03:54 +0530 Rashika Kheria <rashika.kheria@xxxxxxxxx> wrote:

> Move prototype declaration to header file include/linux/crash_dump.h

It adds a prototype rather than moving it.

> because it is used by more than file.

True, but you didn't notice the second user ;)

> --- a/include/linux/crash_dump.h
> +++ b/include/linux/crash_dump.h
> @@ -25,6 +25,7 @@ extern int __weak remap_oldmem_pfn_range(struct vm_area_struct *vma,
>
> extern ssize_t copy_oldmem_page(unsigned long, char *, size_t,
> unsigned long, int);
> +void vmcore_cleanup(void);
>
> /* Architecture code defines this if there are other possible ELF
> * machine types, e.g. on bi-arch capable hardware. */

Take a look over in powerpc...

From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Subject: include-linux-crash_dumph-add-vmcore_cleanup-prototype-fix

clean up powerpc, remove unneeded EXPORT_SYMBOL

Cc: Josh Triplett <josh@xxxxxxxxxxxxxxxx>
Cc: Rashika Kheria <rashika.kheria@xxxxxxxxx>
Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

arch/powerpc/include/asm/fadump.h | 1 -
fs/proc/vmcore.c | 1 -
2 files changed, 2 deletions(-)

--- a/arch/powerpc/include/asm/fadump.h~include-linux-crash_dumph-add-vmcore_cleanup-prototype-fix
+++ a/arch/powerpc/include/asm/fadump.h
@@ -210,7 +210,6 @@ extern int is_fadump_active(void);
extern void crash_fadump(struct pt_regs *, const char *);
extern void fadump_cleanup(void);

-extern void vmcore_cleanup(void);
#else /* CONFIG_FA_DUMP */
static inline int is_fadump_active(void) { return 0; }
static inline void crash_fadump(struct pt_regs *regs, const char *str) { }
--- a/fs/proc/vmcore.c~include-linux-crash_dumph-add-vmcore_cleanup-prototype-fix
+++ a/fs/proc/vmcore.c
@@ -1118,4 +1118,3 @@ void vmcore_cleanup(void)
}
free_elfcorebuf();
}
-EXPORT_SYMBOL_GPL(vmcore_cleanup);
_

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/