public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* Move scsi.h, hosts.h to include/linux/scsi ?
@ 2003-02-16 21:14 Sam Ravnborg
  2003-02-17 12:18 ` Christoph Hellwig
  0 siblings, 1 reply; 6+ messages in thread
From: Sam Ravnborg @ 2003-02-16 21:14 UTC (permalink / raw)
  To: linux-scsi

The usual rule within the kernel is that all header files useby more than
one file, or at least by files spread all over the kernel,
should be located in include/linux.

Has this been considered for scsi.h, and if not so - why not?
The same for hosts.h.

Background for my question is that I'm doing some kbuild changes,
and it is rather annoying to support include of scsi.h from all over.
See the following snippet from: arch/i386/kernel/edd.c

/* FIXME - this really belongs in include/scsi/scsi.h */
#include <../drivers/scsi/scsi.h>
#include <../drivers/scsi/hosts.h>
 
I'm willing to do the footwork if the general answer is 'go for it',
but do not want to invest the time needed before general acceptance.

By the way - more candidates in drivers/scsi?

	Sam

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

* Re: Move scsi.h, hosts.h to include/linux/scsi ?
  2003-02-16 21:14 Move scsi.h, hosts.h to include/linux/scsi ? Sam Ravnborg
@ 2003-02-17 12:18 ` Christoph Hellwig
  2003-02-17 12:53   ` Sam Ravnborg
  0 siblings, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2003-02-17 12:18 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: linux-scsi

On Sun, Feb 16, 2003 at 10:14:22PM +0100, Sam Ravnborg wrote:
> The usual rule within the kernel is that all header files useby more than
> one file, or at least by files spread all over the kernel,
> should be located in include/linux.
> 
> Has this been considered for scsi.h, and if not so - why not?
> The same for hosts.h.
> 
> Background for my question is that I'm doing some kbuild changes,
> and it is rather annoying to support include of scsi.h from all over.
> See the following snippet from: arch/i386/kernel/edd.c

It's not that simple.  First the current hosts.h/scsi.h split doesn't make
sense.  Second include/linux/scsi/ is a bad idea, either add more headers to
include/scsi/ or include/linux/.

I'd prefer either

	include/scsi/core.h
	include/scsi/hba.h
	include/scsi/upper.h

or

	include/linux/scsi.h (for everything)

plus a drivers/scsi/scsiP.h for stuff private to the midlayer.

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

* Re: Move scsi.h, hosts.h to include/linux/scsi ?
  2003-02-17 12:18 ` Christoph Hellwig
@ 2003-02-17 12:53   ` Sam Ravnborg
  2003-02-17 12:58     ` Christoph Hellwig
  0 siblings, 1 reply; 6+ messages in thread
From: Sam Ravnborg @ 2003-02-17 12:53 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Sam Ravnborg, linux-scsi

On Mon, Feb 17, 2003 at 12:18:40PM +0000, Christoph Hellwig wrote:

> I'd prefer either
> 
> 	include/scsi/core.h
> 	include/scsi/hba.h

Hmm, hba = Host Bus Adapter.
I did not see this abbrevation used in scsi.h, neither hosts.h

> 	include/scsi/upper.h

How much does upper.h differ from the current hosts.h?

In general just combining all the stuff in a single scsi.h file
(the other alternative)  looks ugly to me.
If prefer cleaner and more distributed information.

> 
> plus a drivers/scsi/scsiP.h for stuff private to the midlayer.
But then the usage is restricted to users in drivers/scsi - and
not anything living in arch/* - OK?

Anyway - I'm prepared to do some trivial update of include statements
all over the tree. But I'm not the right person to do the suggested
split-up.
So if anyone step forwards to do the split-up, I will be glad to help
sort out the usage around in the kernel tree.

The SCSI subsystem should be in the same state before and after,
meaning that there should not be any left-overs from such a simple
operation.

	Sam

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

* Re: Move scsi.h, hosts.h to include/linux/scsi ?
  2003-02-17 12:53   ` Sam Ravnborg
@ 2003-02-17 12:58     ` Christoph Hellwig
  2003-02-17 13:07       ` Sam Ravnborg
  0 siblings, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2003-02-17 12:58 UTC (permalink / raw)
  To: Sam Ravnborg, linux-scsi

On Mon, Feb 17, 2003 at 01:53:34PM +0100, Sam Ravnborg wrote:
> > 	include/scsi/upper.h
> 
> How much does upper.h differ from the current hosts.h?

upper is for the upper layer drivers (sd, sr, ...).  So there's
not much in common - this is what the HBA's don't need.

> In general just combining all the stuff in a single scsi.h file
> (the other alternative)  looks ugly to me.

Why?  If you think the current hosts.h make sense please explain
me the rules on why stuff is in hosts.h instead of scsi.h..

> > plus a drivers/scsi/scsiP.h for stuff private to the midlayer.
> But then the usage is restricted to users in drivers/scsi - and
> not anything living in arch/* - OK?

Yes, it's the stuff private to the scsi midlayer (scsi_*.c, hosts.c),
i.e. everything not exported to modules.


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

* Re: Move scsi.h, hosts.h to include/linux/scsi ?
  2003-02-17 12:58     ` Christoph Hellwig
@ 2003-02-17 13:07       ` Sam Ravnborg
  2003-02-17 14:18         ` Christoph Hellwig
  0 siblings, 1 reply; 6+ messages in thread
From: Sam Ravnborg @ 2003-02-17 13:07 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Sam Ravnborg, linux-scsi

On Mon, Feb 17, 2003 at 12:58:21PM +0000, Christoph Hellwig wrote:
> > In general just combining all the stuff in a single scsi.h file
> > (the other alternative)  looks ugly to me.
> 
> Why?  If you think the current hosts.h make sense please explain
> me the rules on why stuff is in hosts.h instead of scsi.h..

It was just my first hand impressions that hosts.c had something to do
upper.h.
I have not looked into scsi before - and I'm not planning to that
except on a janitorial level. In other words I can do simple stuff
that moves definitions around, but I do not claim I understand the
SCSI subsystem. And I do not plan to invest the time needed to
understand it.
Hope that clarifies.

As I wrote in the previous mail, I'm not going to do any split-up as
you suggested. Simply because it would take much more time
understanding the SCSI subsystem than actually doing the split-up.

My only incentive is to avoid those ugly includes that requires an
extra option to gcc in my current kbuild patch for separate objdir.

	Sam

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

* Re: Move scsi.h, hosts.h to include/linux/scsi ?
  2003-02-17 13:07       ` Sam Ravnborg
@ 2003-02-17 14:18         ` Christoph Hellwig
  0 siblings, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2003-02-17 14:18 UTC (permalink / raw)
  To: Christoph Hellwig, Sam Ravnborg, linux-scsi

On Mon, Feb 17, 2003 at 02:07:56PM +0100, Sam Ravnborg wrote:
> As I wrote in the previous mail, I'm not going to do any split-up as
> you suggested. Simply because it would take much more time
> understanding the SCSI subsystem than actually doing the split-up.

I didn't want to dump it on you :)

> My only incentive is to avoid those ugly includes that requires an
> extra option to gcc in my current kbuild patch for separate objdir.

*nod*


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

end of thread, other threads:[~2003-02-17 14:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-16 21:14 Move scsi.h, hosts.h to include/linux/scsi ? Sam Ravnborg
2003-02-17 12:18 ` Christoph Hellwig
2003-02-17 12:53   ` Sam Ravnborg
2003-02-17 12:58     ` Christoph Hellwig
2003-02-17 13:07       ` Sam Ravnborg
2003-02-17 14:18         ` Christoph Hellwig

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