lkml.org 
[lkml]   [2005]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] sh64 (mm/ioremap.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 <clucas@rotomalug.org>

diff -urpNX dontdiff linux-2.6.13-rc4-mm1.orig/arch/sh64/mm/ioremap.c linux-2.6.13-rc4-mm1/arch/sh64/mm/ioremap.c
--- linux-2.6.13-rc4-mm1.orig/arch/sh64/mm/ioremap.c 2005-07-29 00:44:44.000000000 +0200
+++ linux-2.6.13-rc4-mm1/arch/sh64/mm/ioremap.c 2005-08-03 12:41:14.000000000 +0200
@@ -460,9 +460,11 @@ ioremap_proc_info(char *buf, char **star

static int __init register_proc_onchip(void)
{
-#ifdef CONFIG_PROC_FS
- create_proc_read_entry("io_map",0,0, ioremap_proc_info, &shmedia_iomap);
-#endif
+ struct proc_dir_entry* ent;
+ ent = create_proc_read_entry("io_map",0,0,
+ ioremap_proc_info, &shmedia_iomap);
+ if (!ent)
+ procfs_failure("ioremap.c: Unable to create /proc entry.\n");
return 0;
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-08-04 17:47    [W:0.029 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site