SCSI: esas2r: Make structure default_sas_nvram constant
Subsystems (2)
PATCH 1/1 SCSI: esas2r: Make structure default_sas_nvram constant
Static structure default_sas_nvram, of type esas2r_sas_nvram, is used only when copied to a local variable; it is never modified itself. Hence make it constant to protect it from unintended modification. Issue found with Coccinelle.
Signed-off-by Nishka Dasgupta <[email protected]>
--- drivers/scsi/esas2r/esas2r_flash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/esas2r/esas2r_flash.c +1 -1
@@ -54,7 +54,7 @@#define ESAS2R_FS_DRVR_VER 2 -static struct esas2r_sas_nvram default_sas_nvram = { +static const struct esas2r_sas_nvram default_sas_nvram = { {'E' ,'S' ,'A' ,'S' },/* signature */ SASNVR_VERSION ,/* version */ 0 ,/* checksum */
Signature · 1 line
2.19.1