sh64 (kernel/process.c): procfs_failure && create_proc*
PATCH 1/1 sh64 (kernel/process.c): procfs_failure && create_proc*
description:
audit return code of create_proc_* function is a entry in janitors TODO list. Audit this return and printk() when it fails, can spam a lot system without compiled proc support. So this patch can audit return code by means of procfs_failure().
Signed-off-by Christophe Lucas <[email protected]>
arch/sh64/kernel/process.c +5 -2
@@ -953,8 +953,11 @@ asids_proc_info(char *buf, char **start,static int __init register_proc_asids (void ) { -create_proc_read_entry ("asids" ,0 ,NULL , asids_proc_info,NULL ); -return 0 ; +struct proc_dir_entry * ent; + ent =create_proc_read_entry ("asids" ,0 ,NULL , asids_proc_info,NULL ); +if (!ent) +procfs_failure ("process: Unable to create asids /proc entry.\n" ); +return 0 ; }__initcall (register_proc_asids);
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors