From: Thomas Weißschuh Date: Mon, 16 Dec 2024 11:29:16 +0000 (+0100) Subject: scsi: qedi: Constify 'struct bin_attribute' X-Git-Tag: v6.14-rc1~80^2~18^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f9d0a8450ee3a945c6ba14624ff4034d155351f1;p=thirdparty%2Fkernel%2Flinux.git 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 Link: https://lore.kernel.org/r/20241216-sysfs-const-bin_attr-scsi-v1-9-f0a5e54b3437@weissschuh.net Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/qedi/qedi_dbg.h b/drivers/scsi/qedi/qedi_dbg.h index fdda12ef13b0f..5a1ec45421834 100644 --- a/drivers/scsi/qedi/qedi_dbg.h +++ b/drivers/scsi/qedi/qedi_dbg.h @@ -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,