Skip to contentSkip to conversation

simple ide without proc compile fix

PATCH In review Robert Love 2 participants 3 messages Dec 5, 2001 – Dec 6, 2001

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 simple ide without proc compile fix

Attached patch is a repost now against 2.4.17-pre4.

IDE will not compile without CONFIG_PROC_FS defined. This patch fixes that.

Yes, ifdefs in the code are not preferred. But this is merely following the pattern in the rest of the ide*.c files (see other uses of ide_remove_proc_entries -- just these two seem to be without ifdefs).

Please, apply.

Robert Love

drivers/ide/ide-disk.c +2 -0
@@ -858,8 +858,10 @@
 		}
 		/* We must remove proc entries defined in this module.
 		   Otherwise we oops while accessing these entries */
+#ifdef CONFIG_PROC_FS
 		if (drive->proc)
 			ide_remove_proc_entries(drive->proc, idedisk_proc);
+#endif
 	}
 	ide_unregister_module(&idedisk_module);
 }
drivers/ide/ide-floppy.c +2 -0
@@ -2071,8 +2071,10 @@
 		}
 		/* We must remove proc entries defined in this module.
 		   Otherwise we oops while accessing these entries */
+#ifdef CONFIG_PROC_FS
 		if (drive->proc)
 			ide_remove_proc_entries(drive->proc, idefloppy_proc);
+#endif
 	}
 	ide_unregister_module(&idefloppy_module);
 }
#1 lore raw
Quoted 8 lines · Robert Love

Attached patch is a repost now against 2.4.17-pre4.

IDE will not compile without CONFIG_PROC_FS defined. This patch fixes that.

Yes, ifdefs in the code are not preferred. But this is merely following the pattern in the rest of the ide*.c files (see other uses of ide_remove_proc_entries -- just these two seem to be without ifdefs).

Wouldn't a dummy, in case of no proc, be preferable? That'd make it possible to remove all the #ifdef CONFIG_PROC_FS

/David
_ _
// David Weinehall <[email protected]> /> Northern lights wander \\

//  Maintainer of the v2.0 kernel   //  Dance across the winter sky //
\>  http://www.acc.umu.se/~tao/    </   Full colour fire           </
#2 lore raw
Quoted 2 lines · David Weinehall

Wouldn't a dummy, in case of no proc, be preferable? That'd make it possible to remove all the #ifdef CONFIG_PROC_FS

Yes, but like I said I'm just fixing a bug (by mimicking the other code's behavior). It certainly is preferable to do what you say.

There is one issue, though. IDE code doesn't seem to have any common header. With the function in multiple files, that complicates thing ...

Robert Love