[-mm patch] EDAC: remove proc_ent from struct mem_ctl_info

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



While fixing a compile error with CONFIG_PROC_FS=n in the EDAC code, I 
discovered that the proc_ent member of struct mem_ctl_info is only used 
in a debug printk.

Is this patch to remove proc_ent OK?


Signed-off-by: Adrian Bunk <[email protected]>

 drivers/edac/edac_mc.c |    8 ++------
 drivers/edac/edac_mc.h |    3 ---
 2 files changed, 2 insertions(+), 9 deletions(-)

--- linux-2.6.14-rc5-mm1-modular-2.95/drivers/edac/edac_mc.h.old	2005-11-02 02:38:08.000000000 +0100
+++ linux-2.6.14-rc5-mm1-modular-2.95/drivers/edac/edac_mc.h	2005-11-02 02:38:19.000000000 +0100
@@ -313,9 +313,6 @@
 	const char *mod_ver;
 	const char *ctl_name;
 	char proc_name[MC_PROC_NAME_MAX_LEN + 1];
-#ifdef CONFIG_PROC_FS
-	struct proc_dir_entry *proc_ent;
-#endif
 	void *pvt_info;
 	u32 ue_noinfo_count;	/* Uncorrectable Errors w/o info */
 	u32 ce_noinfo_count;	/* Correctable Errors w/o info */
--- linux-2.6.14-rc5-mm1-modular-2.95/drivers/edac/edac_mc.c.old	2005-11-02 02:38:30.000000000 +0100
+++ linux-2.6.14-rc5-mm1-modular-2.95/drivers/edac/edac_mc.c	2005-11-02 02:39:44.000000000 +0100
@@ -362,8 +362,6 @@
 	printk(KERN_INFO "\tpdev = %p\n", mci->pdev);
 	printk(KERN_INFO "\tmod_name:ctl_name = %s:%s\n",
 	       mci->mod_name, mci->ctl_name);
-	printk(KERN_INFO "\tproc_name = %s, proc_ent = %p\n",
-	       mci->proc_name, mci->proc_ent);
 	printk(KERN_INFO "\tpvt_info = %p\n\n", mci->pvt_info);
 }
 
@@ -575,10 +573,8 @@
 		goto finish;
 	}
 
-	mci->proc_ent = create_proc_read_entry(mci->proc_name, 0, proc_mc,
-					       mc_read_proc, (void *) mci);
-
-	if (mci->proc_ent == NULL) {
+	if(create_proc_read_entry(mci->proc_name, 0, proc_mc,
+	                          mc_read_proc, (void *) mci) == NULL) {
 		printk(KERN_WARNING
 		       "MC%d: failed to create proc entry for controller\n",
 		       mci->mc_idx);

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux