Move scsi.h, hosts.h to include/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
Quoted 10 lines · Sam Ravnborg
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 forhosts.h.Background for my question is that I'm doing some kbuild changes, and it is rather annoying to support include of
scsi.hfrom 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.
Quoted 4 lines · Christoph Hellwig
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
Quoted 1 line
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.
Quoted 2 lines
plus a
drivers/scsi/scsiP.hfor 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
Quoted 3 lines · Sam Ravnborg
Quoted 1 line
include/scsi/upper.hHow much does
upper.hdiffer from the currenthosts.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.
Quoted 2 lines
In general just combining all the stuff in a single
scsi.hfile (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..
Quoted 3 lines
Quoted 1 line
plus a
drivers/scsi/scsiP.hfor stuff private to the midlayer.But then the usage is restricted to users in
drivers/scsi- and not anything living inarch/*- OK?
Yes, it's the stuff private to the scsi midlayer (scsi_*.c, hosts.c), i.e. everything not exported to modules.
Quoted 5 lines · Christoph Hellwig
Quoted 2 lines
In general just combining all the stuff in a single
scsi.hfile (the other alternative) looks ugly to me.Why? If you think the current
hosts.hmake sense please explain me the rules on why stuff is inhosts.hinstead ofscsi.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
Quoted 3 lines · Sam Ravnborg
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 :)
Quoted 2 lines
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*