public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* elevator.h problem
@ 2006-06-20  9:28 Jan Engelhardt
  2006-06-20  9:31 ` [PATCH] Standalone inclusion elevator.h Jan Engelhardt
  2006-06-20 13:30 ` elevator.h problem Paolo Ornati
  0 siblings, 2 replies; 4+ messages in thread
From: Jan Engelhardt @ 2006-06-20  9:28 UTC (permalink / raw)
  To: Linux Kernel Mailing List

Hello,


I am trying to compile a module that requires elv_requeue_request.
I include <linux/elevator.h>, but that fails. Now that elevator.h includes 
blkdev.h (to get at the reqeust_queue_t typedef -- see next post), 
blkdev.h wants elv_dequeue_request, but which is defined in elevator.h. 
This circular dependency is really a problem, does anyone have 
an adequate fix? 2.6.17.

Jan Engelhardt
-- 

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

* [PATCH] Standalone inclusion elevator.h
  2006-06-20  9:28 elevator.h problem Jan Engelhardt
@ 2006-06-20  9:31 ` Jan Engelhardt
  2006-06-20 13:30 ` elevator.h problem Paolo Ornati
  1 sibling, 0 replies; 4+ messages in thread
From: Jan Engelhardt @ 2006-06-20  9:31 UTC (permalink / raw)
  To: akpm; +Cc: Linux Kernel Mailing List

Hi,


Patch:
Make it possible to include elevator.h standalone (e.g. as the first file 
of a row of #includes).

(cdemu for example only requires elv_requeue_request and therefore only
needs elevtor.h.)

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>

# AS_59-standalone-linux_elevator_h.diff
diff --fast -dpru linux-2.6.17~/include/linux/elevator.h linux-2.6.17+/include/linux/elevator.h
--- linux-2.6.17~/include/linux/elevator.h	2006-06-18 22:51:43.000000000 +0200
+++ linux-2.6.17+/include/linux/elevator.h	2006-06-20 11:18:13.225409000 +0200
@@ -1,6 +1,12 @@
 #ifndef _LINUX_ELEVATOR_H
 #define _LINUX_ELEVATOR_H
 
+#include <linux/blkdev.h>
+#include <linux/types.h>
+
+struct bio;
+struct request;
+
 typedef int (elevator_merge_fn) (request_queue_t *, struct request **,
 				 struct bio *);
 
#<<eof>>

Jan Engelhardt
-- 

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

* Re: elevator.h problem
  2006-06-20  9:28 elevator.h problem Jan Engelhardt
  2006-06-20  9:31 ` [PATCH] Standalone inclusion elevator.h Jan Engelhardt
@ 2006-06-20 13:30 ` Paolo Ornati
  2006-06-20 14:38   ` Jan Engelhardt
  1 sibling, 1 reply; 4+ messages in thread
From: Paolo Ornati @ 2006-06-20 13:30 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Linux Kernel Mailing List

On Tue, 20 Jun 2006 11:28:35 +0200 (MEST)
Jan Engelhardt <jengelh@linux01.gwdg.de> wrote:

> I am trying to compile a module that requires elv_requeue_request.
> I include <linux/elevator.h>, but that fails. Now that elevator.h includes 
> blkdev.h (to get at the reqeust_queue_t typedef -- see next post), 
> blkdev.h wants elv_dequeue_request, but which is defined in elevator.h. 
> This circular dependency is really a problem, does anyone have 
> an adequate fix? 2.6.17.

"linux/elevator.h" doesn't include anything
"linux/blkdev.h" defines some typedefs needed by elevator.h and then
		includes it

So if you need "linux/elevator.h" you can just do:

#include <linux/blkdev.h>

or

#include <linux/blkdev.h>
#include <linux/elevator.h>


What's the problem?

-- 
	Paolo Ornati
	Linux 2.6.17 on x86_64

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

* Re: elevator.h problem
  2006-06-20 13:30 ` elevator.h problem Paolo Ornati
@ 2006-06-20 14:38   ` Jan Engelhardt
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Engelhardt @ 2006-06-20 14:38 UTC (permalink / raw)
  To: Paolo Ornati; +Cc: Linux Kernel Mailing List

>
>So if you need "linux/elevator.h" you can just do:
>
>#include <linux/blkdev.h>

Ok that one worked, thanks.



Jan Engelhardt
-- 

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

end of thread, other threads:[~2006-06-20 14:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-20  9:28 elevator.h problem Jan Engelhardt
2006-06-20  9:31 ` [PATCH] Standalone inclusion elevator.h Jan Engelhardt
2006-06-20 13:30 ` elevator.h problem Paolo Ornati
2006-06-20 14:38   ` Jan Engelhardt

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