public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] simple ide without proc compile fix
@ 2001-12-05 23:20 Robert Love
  2001-12-06  4:48 ` David Weinehall
  0 siblings, 1 reply; 3+ messages in thread
From: Robert Love @ 2001-12-05 23:20 UTC (permalink / raw)
  To: marcelo, andre; +Cc: linux-kernel

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

--- linux-2.4.17-pre4/drivers/ide/ide-disk.c	Wed Dec  5 15:16:57 2001
+++ linux/drivers/ide/ide-disk.c	Wed Dec  5 18:13:35 2001
@@ -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);
 }
--- linux-2.4.17-pre4/drivers/ide/ide-floppy.c	Wed Dec  5 15:16:57 2001
+++ linux/drivers/ide/ide-floppy.c	Wed Dec  5 18:13:35 2001
@@ -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);
 }


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] simple ide without proc compile fix
  2001-12-05 23:20 [PATCH] simple ide without proc compile fix Robert Love
@ 2001-12-06  4:48 ` David Weinehall
  2001-12-06  5:08   ` Robert Love
  0 siblings, 1 reply; 3+ messages in thread
From: David Weinehall @ 2001-12-06  4:48 UTC (permalink / raw)
  To: Robert Love; +Cc: marcelo, andre, linux-kernel

On Wed, Dec 05, 2001 at 06:20:49PM -0500, Robert Love wrote:
> 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 <tao@acc.umu.se> /> Northern lights wander      \\
//  Maintainer of the v2.0 kernel   //  Dance across the winter sky //
\>  http://www.acc.umu.se/~tao/    </   Full colour fire           </

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] simple ide without proc compile fix
  2001-12-06  4:48 ` David Weinehall
@ 2001-12-06  5:08   ` Robert Love
  0 siblings, 0 replies; 3+ messages in thread
From: Robert Love @ 2001-12-06  5:08 UTC (permalink / raw)
  To: David Weinehall; +Cc: marcelo, andre, linux-kernel

On Wed, 2001-12-05 at 23:48, David Weinehall wrote:

> 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-12-06  5:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-12-05 23:20 [PATCH] simple ide without proc compile fix Robert Love
2001-12-06  4:48 ` David Weinehall
2001-12-06  5:08   ` Robert Love

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox