Skip to contentSkip to conversation

scsi: scsi_transport_fc: make a field of fc_internal structure const

PATCH New Bhumika Goyal 1 participant 1 message Oct 13, 2017 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: scsi_transport_fc: make a field of fc_internal structure const

The 'f' field of the fc_internal structure do not modify the fields of the fc_function_template structure it points to. And there are no other pointers initialized with this field 'f'. So, the field 'f' is never modified and therefore make it const.

---
 drivers/scsi/scsi_transport_fc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/scsi_transport_fc.c +1 -1
index cbd4495..f38975f 100644
@@ -323,7 +323,7 @@ struct device_attribute device_attr_##_prefix##_##_name = 	\
 
 struct fc_internal {
 	struct scsi_transport_template t;
-	struct fc_function_template *f;
+	const struct fc_function_template *f;
 
 	/*
 	 * For attributes : each object has :
Signature · 1 line
1.9.1