Re: [build fix] Re: [GIT PATCH] SCSI part 1

From: Ingo Molnar
Date: Wed Jul 16 2008 - 10:59:34 EST



* Matthew Wilcox <matthew@xxxxxx> wrote:

> On Wed, Jul 16, 2008 at 04:46:02PM +0200, Ingo Molnar wrote:
> > yeah, that's OK - but why is scsi.h #ifdef-ed? For example we can
> > include blkdev.h without #ifdef CONFIG_BLOCK.
>
> Sure. The important bit comes when deciding which bits need to be
> available when CONFIG_BLOCK isn't set. Obviously, there is no SCSI
> without block (while sg is a character device, not a block device, it
> depends on the block infrastructure to the extent that you couldn't
> use it without CONFIG_BLOCK).
>
> While it's not impossible that someone could want the SCSI protocol
> and opcodes, status codes, etc. for a different character device, that
> seems unlikely. The four opcodes defined in the header seem to be
> pretty SCSI-specific and not useful to use on non-scsi devices.
> SCSI_IOCTL_GET_PCI looks like it might possibly be useful on more than
> just SCSI, but we have better ways (ie sysfs) of determining the same
> information in a more general way.
>
> So I think it's fair to put an #ifdef CONFIG_BLOCK right after the
> _SCSI_SCSI_H define and close it right at the end of the file.

yes, that's what blkdev.h does, and that's what i was suggesting we do,
instead of #ifdef-ing around scsi.h use in fs/compat_ioctl.c.

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/