Thread (8 messages) 8 messages, 2 authors, 2021-09-28

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

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: 2021-09-28 04:49:03

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:
quoted
On Fri, Sep 24, 2021 at 04:26:35PM -0700, Bart Van Assche wrote:
quoted
--- 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help