Re: [PATCH v2 3/9] scsi: build scsi_common.o for all scsi passthrough request users

From: hch@xxxxxxxxxxxxx
Date: Tue Jul 31 2018 - 16:12:39 EST


On Tue, Jul 31, 2018 at 08:01:16PM +0000, Bart Van Assche wrote:
> On Tue, 2018-07-31 at 12:51 -0700, Kees Cook wrote:
> > diff --git a/drivers/Makefile b/drivers/Makefile
> > index 24cd47014657..a6abd7a856c6 100644
> > --- a/drivers/Makefile
> > +++ b/drivers/Makefile
> > @@ -76,7 +76,7 @@ obj-$(CONFIG_DMA_SHARED_BUFFER) += dma-buf/
> > obj-$(CONFIG_NUBUS) += nubus/
> > obj-y += macintosh/
> > obj-$(CONFIG_IDE) += ide/
> > -obj-$(CONFIG_SCSI) += scsi/
> > +obj-y += scsi/
> > obj-y += nvme/
> > obj-$(CONFIG_ATA) += ata/
> > obj-$(CONFIG_TARGET_CORE) += target/
>
> The above change not only selects scsi_common.o but also the following object
> files: scsi.o hosts.o scsi_ioctl.o scsicam.o scsi_error.o scsi_lib.o scsi_scan.o
> scsi_sysfs.o scsi_devinfo.o scsi_trace.o scsi_logging.o. That is a change that
> has not been mentioned in the patch description.

It shouldn't. All these are built into scsi_mod.o, which is only built
when CONFIG_SCSI is set. Under what circumstances do you see them built?