> -----Original Message----- > From: Christoph Hellwig <hch@xxxxxx> > Sent: Tuesday, September 04, 2018 10:20 PM > To: Avri Altman <Avri.Altman@xxxxxxx> > Cc: Christoph Hellwig <hch@xxxxxx>; Johannes Thumshirn > <jthumshirn@xxxxxxx>; Hannes Reinecke <hare@xxxxxxxx>; Bart Van Assche > <Bart.VanAssche@xxxxxxx>; James E.J. Bottomley > <jejb@xxxxxxxxxxxxxxxxxx>; Martin K. Petersen > <martin.petersen@xxxxxxxxxx>; linux-scsi@xxxxxxxxxxxxxxx; Stanislav Nijnikov > <Stanislav.Nijnikov@xxxxxxx>; Avi Shchislowski > <Avi.Shchislowski@xxxxxxx>; Alex Lemberg <Alex.Lemberg@xxxxxxx>; > Subhash Jadavani <subhashj@xxxxxxxxxxxxxx>; Vinayak Holikatti > <Vinayak.Holikatti@xxxxxxx> > Subject: Re: [PATCH v3 1/7] scsi: ufs: Add ufs-bsg module > > > +config SCSI_UFS_BSG > > + bool "Universal Flash Storage BSG device node" > > So this a bool, > > > obj-$(CONFIG_SCSI_UFSHCD_PCI) += ufshcd-pci.o > > obj-$(CONFIG_SCSI_UFSHCD_PLATFORM) += ufshcd-pltfrm.o > > obj-$(CONFIG_SCSI_UFS_HISI) += ufs-hisi.o > > +obj-$(CONFIG_SCSI_UFS_BSG) += ufs_bsg.o > > But built as a separate module, which is rather odd. I think > you wan to build this into the main ufshcd-core driver as a conditionally > compiled object instead. Done. > > > + > > +struct ufs_bsg { > > + struct ufs_hba *hba; > > + struct ufs_bsg_node *node; > > +}; > > +static struct ufs_bsg *bsg_host; > > This looks odd. Why would you want a global variable like this? > I'd expect every ufs host to have a ufs_bsg_node, and in fact > we should probably just merge the ufs_bsg_node into the ufs_hba > structure. Done. Thanks, Avri