lkml.org 
[lkml]   [2017]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] scsi: scsi_transport_fc: make a field of fc_internal structure const
Date
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.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
drivers/scsi/scsi_transport_fc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c
index cbd4495..f38975f 100644
--- a/drivers/scsi/scsi_transport_fc.c
+++ b/drivers/scsi/scsi_transport_fc.c
@@ -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 :
--
1.9.1
\
 
 \ /
  Last update: 2017-10-13 16:31    [W:0.092 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site