Skip to contentSkip to conversation

RFC: move hosts.h, scsi.h

DISCUSSION Jeff Garzik 3 participants 6 messages May 22, 2003 – May 23, 2003 SCSI

lore
Share & tools
lore
#0 lore raw

I request permission to do the following:

1) bk mv drivers/scsi/scsi.h include/linux
2) bk mv drivers/scsi/hosts.h include/linux/scsi_hosts.h
3) bk mv drivers/scsi/scsi_obsolete.h include/linux
4) create shell drivers/scsi/{...}.h that includes just-moved files, so to preserve full driver source compatibility.
5) edit include/linux/scsi.h to include <linux/scsi_obsolete.h> not "scsi_obsolete.h"

Objections/comments?

#1 lore raw
Quoted 11 lines · Jeff Garzik

I request permission to do the following:

1) bk mv drivers/scsi/scsi.h include/linux
2) bk mv drivers/scsi/hosts.h include/linux/scsi_hosts.h
3) bk mv drivers/scsi/scsi_obsolete.h include/linux
4) create shell drivers/scsi/{...}.h that includes just-moved files, so to preserve full driver source compatibility.
5) edit include/linux/scsi.h to include <linux/scsi_obsolete.h> not "scsi_obsolete.h"

Objections/comments?

No doubt with the goal of removing all those ugly

	#include "../../scsi/hosts.h"

A good plan.

I think point 5) is superfluous.
(That is, I think by default "foo.h" is found in the directory of the including file.)

Probably this would mean that usb/storage/Makefile no longer needs -Idrivers/scsi, provided the "scsi.h" there is replaced by <linux/scsi.h>.

Remains the vague objection: it is a bit confusing to have several files of the same name. And in case some compilation has both include/linux and include/scsi on the include path there are ordering restraints. Maybe life will be easier if you invent some other name like scsidefs.h.

Andries

#2 lore raw
Quoted 11 lines · Andries Brouwer
Quoted 8 lines · Jeff Garzik

I request permission to do the following:

1) bk mv drivers/scsi/scsi.h include/linux
2) bk mv drivers/scsi/hosts.h include/linux/scsi_hosts.h
3) bk mv drivers/scsi/scsi_obsolete.h include/linux
4) create shell drivers/scsi/{...}.h that includes just-moved files, so to preserve full driver source compatibility.
5) edit include/linux/scsi.h to include <linux/scsi_obsolete.h> not "scsi_obsolete.h"

Quoted 5 lines
Quoted 1 line

Objections/comments?

No doubt with the goal of removing all those ugly

	#include "../../scsi/hosts.h"

Yes, and nasty -I hacks in Makefiles.

Quoted 5 lines

A good plan.

I think point 5) is superfluous.
(That is, I think by default "foo.h" is found in the directory of the including file.)

I thought so too, but gcc disagreed :)

I think '#include <linux/...>' is more clean, too.

Quoted 3 lines

Probably this would mean that usb/storage/Makefile no longer needs -Idrivers/scsi, provided the "scsi.h" there is replaced by <linux/scsi.h>.

Yep

Quoted 5 lines

Remains the vague objection: it is a bit confusing to have several files of the same name. And in case some compilation has both include/linux and include/scsi on the include path there are ordering restraints. Maybe life will be easier if you invent some other name like scsidefs.h.

Easily done and a good objection/suggestion. I'm using scsi_{defs,hosts,obsolete}.h in my local tree right now.

Jeff

#3 lore raw
In reply to Jeff Garzik
Quoted 11 lines · Jeff Garzik

I request permission to do the following:

1) bk mv drivers/scsi/scsi.h include/linux
2) bk mv drivers/scsi/hosts.h include/linux/scsi_hosts.h
3) bk mv drivers/scsi/scsi_obsolete.h include/linux
4) create shell drivers/scsi/{...}.h that includes just-moved files, so to preserve full driver source compatibility.
5) edit include/linux/scsi.h to include <linux/scsi_obsolete.h> not "scsi_obsolete.h"

Objections/comments?

It's not that easy. The current host.h/scsi.h split is silly we either want to merge them or better split them saner (and into more pieces). The current scsi_obsolete.h should go away completly, it may make a driver compile but not work (missing EH). OTOH all those ugly typedefs should move into a 'new' onbsolete.h. Also all this should go into include/scsi/

#4 lore raw
Quoted 1 line · Christoph Hellwig

Also all this should go into include/scsi/

Long ago include/scsi was created to contain stuff for inclusion by user space.

But yes, I see that several of these files have been polluted already with kernel-only stuff.

#5 lore raw
In reply to Christoph Hellwig
Quoted 10 lines · Christoph Hellwig
Quoted 8 lines · Jeff Garzik

I request permission to do the following:

1) bk mv drivers/scsi/scsi.h include/linux
2) bk mv drivers/scsi/hosts.h include/linux/scsi_hosts.h
3) bk mv drivers/scsi/scsi_obsolete.h include/linux
4) create shell drivers/scsi/{...}.h that includes just-moved files, so to preserve full driver source compatibility.
5) edit include/linux/scsi.h to include <linux/scsi_obsolete.h> not "scsi_obsolete.h"

Quoted 8 lines
Quoted 1 line

Objections/comments?

It's not that easy. The current host.h/scsi.h split is silly we either want to merge them or better split them saner (and into more pieces). The current scsi_obsolete.h should go away completly, it may make a driver compile but not work (missing EH). OTOH all those ugly typedefs should move into a 'new' onbsolete.h. Also all this should go into include/scsi/

This is a whole list of steps to perform after I submit the above changes :)

Sure there are many other improvements to be made. What I suggest is one small step in that direction. It's an important step because it's the minimum necessary to get a sane include structure, with minimum controversy. It's also backport-able to 2.4.

Since files are now just a "bk mv" away from a new pathname, a new file location may easily be debated and then implemented, at a later date.

Jeff