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

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

 



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.

diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
index 5afdc094a445..aa1207ab9d2e 100644
--- a/include/scsi/scsi_host.h
+++ b/include/scsi/scsi_host.h
@@ -481,7 +481,7 @@ struct scsi_host_template {
  	/*
  	 * Pointer to the SCSI device properties for this host, NULL terminated.
  	 */
-	struct device_attribute **sdev_attrs;
+	struct attribute **sdev_attrs;

Same here, "const struct attribute_group **groups;" ?

I will make this change.

Thanks,

Bart.



[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