Re: [PATCH 2/2] scsi: Register SCSI device sysfs attributes earlier

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 27, 2021 at 10:37:03AM -0700, Bart Van Assche wrote:
> On 9/25/21 2:03 AM, Greg Kroah-Hartman wrote:
> > On Fri, Sep 24, 2021 at 04:26:35PM -0700, Bart Van Assche wrote:
> > > --- a/include/scsi/scsi_device.h
> > > +++ b/include/scsi/scsi_device.h
> > > @@ -226,6 +226,8 @@ struct scsi_device {
> > >   	struct device		sdev_gendev,
> > >   				sdev_dev;
> > > +	struct attribute_group  gendev_first_attr_group;
> > > +	const struct attribute_group *gendev_attr_groups[6];
> > 
> > Where does 6 come from?
> 
> 1 + 4 + 1: one array entry for the SCSI core sysfs attributes, four for the
> device driver attributes (this is the current limit) and one entry for the NULL
> terminating entry.

Please document this somewhere, otherwise it really looks like a random
number :)

thanks,

greg k-h



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux