> -----Original Message-----
> From: Christoph Hellwig <h...@lst.de>
> Sent: Tuesday, September 04, 2018 10:20 PM
> To: Avri Altman <avri.alt...@wdc.com>
> Cc: Christoph Hellwig <h...@lst.de>; Johannes Thumshirn
> <jthumsh...@suse.de>; Hannes Reinecke <h...@suse.com>; Bart Van Assche
> <bart.vanass...@wdc.com>; James E.J. Bottomley
> <j...@linux.vnet.ibm.com>; Martin K. Petersen
> <martin.peter...@oracle.com>; linux-scsi@vger.kernel.org; Stanislav Nijnikov
> <stanislav.nijni...@wdc.com>; Avi Shchislowski
> <avi.shchislow...@wdc.com>; Alex Lemberg <alex.lemb...@wdc.com>;
> Subhash Jadavani <subha...@codeaurora.org>; Vinayak Holikatti
> <vinayak.holika...@wdc.com>
> 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

Reply via email to