Make unregister_binfmt() return void
Subsystems (2)
PATCH 2/2 Make unregister_binfmt() return void
list_del() hardly can fail, so checking for return value is pointless (and current code always return 0).
Nobody really cared that return value anyway.
Signed-off-by Alexey Dobriyan <[email protected]>
---
arch/ia64/ia32/binfmt_elf32.c | 2 +- fs/exec.c | 3 +-- include/linux/binfmts.h | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-)
arch/ia64/ia32/binfmt_elf32.c +1 -1
@@ -275,7 +275,7 @@ static int __init check_elf32_binfmt(void) {if (cpu_uses_ia32el ()) {printk ("Please use IA-32 EL for executing IA-32 binaries\n" ); -return unregister_binfmt (&elf_format); +unregister_binfmt (&elf_format); }return 0 ; }
fs/exec.c +1 -2
@@ -81,12 +81,11 @@ int register_binfmt(struct linux_binfmt * fmt)EXPORT_SYMBOL (register_binfmt); -int unregister_binfmt (struct linux_binfmt * fmt) +void unregister_binfmt (struct linux_binfmt * fmt) {write_lock (&binfmt_lock);list_del (&fmt->lh);write_unlock (&binfmt_lock); -return 0 ; }EXPORT_SYMBOL (unregister_binfmt);
include/linux/binfmts.h +1 -1
@@ -65,7 +65,7 @@ struct linux_binfmt { };extern int register_binfmt (struct linux_binfmt *); -extern int unregister_binfmt (struct linux_binfmt *); +extern void unregister_binfmt (struct linux_binfmt *);extern int prepare_binprm (struct linux_binprm *);extern void remove_arg_zero (struct linux_binprm *);