__register_binfmt() made void
Just don't pass NULL to it - nobody does, anyway. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
54bf586e1f
commit
8fc3dc5a3a
|
@ -46,6 +46,7 @@ static struct linux_binfmt loader_format = {
|
||||||
|
|
||||||
static int __init init_loader_binfmt(void)
|
static int __init init_loader_binfmt(void)
|
||||||
{
|
{
|
||||||
return insert_binfmt(&loader_format);
|
insert_binfmt(&loader_format);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
arch_initcall(init_loader_binfmt);
|
arch_initcall(init_loader_binfmt);
|
||||||
|
|
|
@ -519,7 +519,8 @@ static int load_aout_library(struct file *file)
|
||||||
|
|
||||||
static int __init init_aout_binfmt(void)
|
static int __init init_aout_binfmt(void)
|
||||||
{
|
{
|
||||||
return register_binfmt(&aout_format);
|
register_binfmt(&aout_format);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __exit exit_aout_binfmt(void)
|
static void __exit exit_aout_binfmt(void)
|
||||||
|
|
|
@ -454,7 +454,8 @@ static int load_aout_library(struct file *file)
|
||||||
|
|
||||||
static int __init init_aout_binfmt(void)
|
static int __init init_aout_binfmt(void)
|
||||||
{
|
{
|
||||||
return register_binfmt(&aout_format);
|
register_binfmt(&aout_format);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __exit exit_aout_binfmt(void)
|
static void __exit exit_aout_binfmt(void)
|
||||||
|
|
|
@ -2077,7 +2077,8 @@ static int elf_core_dump(struct coredump_params *cprm)
|
||||||
|
|
||||||
static int __init init_elf_binfmt(void)
|
static int __init init_elf_binfmt(void)
|
||||||
{
|
{
|
||||||
return register_binfmt(&elf_format);
|
register_binfmt(&elf_format);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __exit exit_elf_binfmt(void)
|
static void __exit exit_elf_binfmt(void)
|
||||||
|
|
|
@ -91,7 +91,8 @@ static struct linux_binfmt elf_fdpic_format = {
|
||||||
|
|
||||||
static int __init init_elf_fdpic_binfmt(void)
|
static int __init init_elf_fdpic_binfmt(void)
|
||||||
{
|
{
|
||||||
return register_binfmt(&elf_fdpic_format);
|
register_binfmt(&elf_fdpic_format);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __exit exit_elf_fdpic_binfmt(void)
|
static void __exit exit_elf_fdpic_binfmt(void)
|
||||||
|
|
|
@ -100,7 +100,8 @@ static struct linux_binfmt em86_format = {
|
||||||
|
|
||||||
static int __init init_em86_binfmt(void)
|
static int __init init_em86_binfmt(void)
|
||||||
{
|
{
|
||||||
return register_binfmt(&em86_format);
|
register_binfmt(&em86_format);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __exit exit_em86_binfmt(void)
|
static void __exit exit_em86_binfmt(void)
|
||||||
|
|
|
@ -950,7 +950,8 @@ static int load_flat_binary(struct linux_binprm * bprm, struct pt_regs * regs)
|
||||||
|
|
||||||
static int __init init_flat_binfmt(void)
|
static int __init init_flat_binfmt(void)
|
||||||
{
|
{
|
||||||
return register_binfmt(&flat_format);
|
register_binfmt(&flat_format);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
|
@ -726,11 +726,8 @@ static struct file_system_type bm_fs_type = {
|
||||||
static int __init init_misc_binfmt(void)
|
static int __init init_misc_binfmt(void)
|
||||||
{
|
{
|
||||||
int err = register_filesystem(&bm_fs_type);
|
int err = register_filesystem(&bm_fs_type);
|
||||||
if (!err) {
|
if (!err)
|
||||||
err = insert_binfmt(&misc_format);
|
insert_binfmt(&misc_format);
|
||||||
if (err)
|
|
||||||
unregister_filesystem(&bm_fs_type);
|
|
||||||
}
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,8 @@ static struct linux_binfmt script_format = {
|
||||||
|
|
||||||
static int __init init_script_binfmt(void)
|
static int __init init_script_binfmt(void)
|
||||||
{
|
{
|
||||||
return register_binfmt(&script_format);
|
register_binfmt(&script_format);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __exit exit_script_binfmt(void)
|
static void __exit exit_script_binfmt(void)
|
||||||
|
|
|
@ -289,7 +289,8 @@ static int load_som_library(struct file *f)
|
||||||
|
|
||||||
static int __init init_som_binfmt(void)
|
static int __init init_som_binfmt(void)
|
||||||
{
|
{
|
||||||
return register_binfmt(&som_format);
|
register_binfmt(&som_format);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __exit exit_som_binfmt(void)
|
static void __exit exit_som_binfmt(void)
|
||||||
|
|
|
@ -79,15 +79,13 @@ static atomic_t call_count = ATOMIC_INIT(1);
|
||||||
static LIST_HEAD(formats);
|
static LIST_HEAD(formats);
|
||||||
static DEFINE_RWLOCK(binfmt_lock);
|
static DEFINE_RWLOCK(binfmt_lock);
|
||||||
|
|
||||||
int __register_binfmt(struct linux_binfmt * fmt, int insert)
|
void __register_binfmt(struct linux_binfmt * fmt, int insert)
|
||||||
{
|
{
|
||||||
if (!fmt)
|
BUG_ON(!fmt);
|
||||||
return -EINVAL;
|
|
||||||
write_lock(&binfmt_lock);
|
write_lock(&binfmt_lock);
|
||||||
insert ? list_add(&fmt->lh, &formats) :
|
insert ? list_add(&fmt->lh, &formats) :
|
||||||
list_add_tail(&fmt->lh, &formats);
|
list_add_tail(&fmt->lh, &formats);
|
||||||
write_unlock(&binfmt_lock);
|
write_unlock(&binfmt_lock);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_SYMBOL(__register_binfmt);
|
EXPORT_SYMBOL(__register_binfmt);
|
||||||
|
|
|
@ -92,17 +92,17 @@ struct linux_binfmt {
|
||||||
unsigned long min_coredump; /* minimal dump size */
|
unsigned long min_coredump; /* minimal dump size */
|
||||||
};
|
};
|
||||||
|
|
||||||
extern int __register_binfmt(struct linux_binfmt *fmt, int insert);
|
extern void __register_binfmt(struct linux_binfmt *fmt, int insert);
|
||||||
|
|
||||||
/* Registration of default binfmt handlers */
|
/* Registration of default binfmt handlers */
|
||||||
static inline int register_binfmt(struct linux_binfmt *fmt)
|
static inline void register_binfmt(struct linux_binfmt *fmt)
|
||||||
{
|
{
|
||||||
return __register_binfmt(fmt, 0);
|
__register_binfmt(fmt, 0);
|
||||||
}
|
}
|
||||||
/* Same as above, but adds a new binfmt at the top of the list */
|
/* Same as above, but adds a new binfmt at the top of the list */
|
||||||
static inline int insert_binfmt(struct linux_binfmt *fmt)
|
static inline void insert_binfmt(struct linux_binfmt *fmt)
|
||||||
{
|
{
|
||||||
return __register_binfmt(fmt, 1);
|
__register_binfmt(fmt, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern void unregister_binfmt(struct linux_binfmt *);
|
extern void unregister_binfmt(struct linux_binfmt *);
|
||||||
|
|
Loading…
Reference in New Issue