From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758444AbdJMOaH (ORCPT ); Fri, 13 Oct 2017 10:30:07 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:49869 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758255AbdJMOaC (ORCPT ); Fri, 13 Oct 2017 10:30:02 -0400 X-Google-Smtp-Source: ABhQp+Ti6BVhTLG+pia/OwTor6C3TM38vWMrsyVslPCWn9pDGzhpPYcnK9rnvZ8UYrn9RHMvqJ5WgA== From: Bhumika Goyal To: julia.lawall@lip6.fr, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Bhumika Goyal Subject: [PATCH] scsi: scsi_transport_fc: make a field of fc_internal structure const Date: Fri, 13 Oct 2017 16:29:57 +0200 Message-Id: <1507904997-26606-1-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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