scsi: qedi: Constify 'struct bin_attribute'

The sysfs core now allows instances of 'struct bin_attribute' to be moved
into read-only memory. Make use of that to protect them against accidental
or malicious modifications.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20241216-sysfs-const-bin_attr-scsi-v1-9-f0a5e54b3437@weissschuh.net
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Thomas Weißschuh 2024-12-16 12:29:16 +01:00 committed by Martin K. Petersen
parent a8116aa289
commit f9d0a8450e

View File

@ -91,7 +91,7 @@ struct Scsi_Host;
struct sysfs_bin_attrs {
char *name;
struct bin_attribute *attr;
const struct bin_attribute *attr;
};
int qedi_create_sysfs_attr(struct Scsi_Host *shost,