From patchwork Fri Oct 13 14:29:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 10004893 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A9A0D60360 for ; Fri, 13 Oct 2017 14:30:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9D879285A0 for ; Fri, 13 Oct 2017 14:30:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 91B7228644; Fri, 13 Oct 2017 14:30:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3D28F285A0 for ; Fri, 13 Oct 2017 14:30:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758327AbdJMOaG (ORCPT ); Fri, 13 Oct 2017 10:30:06 -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 Received: by mail-wm0-f67.google.com with SMTP id b189so21758632wmd.4; Fri, 13 Oct 2017 07:30:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=HL8PJ6WHj3xsuV0THGa9sGo6CS8j/VAHMtFF0WK5mgo=; b=YroedjoFqIX+SzJ7Ohr3To6E2H+w0yIhUhKsmYTfUroJbuJ/8E0J/JNcUA2XFK2Lie h8HMt/BLa0t2Qn89J1T741upr9N1bJB6h4kqsxVlbpr9F2y+RefMSDiyzw4rH7ygoNEG kLIYk47Oh1Ip6cewmd9ZqHxniJZIFuGnZjjjp0lYbnpAb/hbsFBO5i8SWVyNJUfgn6Qi qfODAbF7QkwsIT+SzVHVS+PGzRPP4GqFTWvneEHRWLhPTihcv4p0erVDfOHgO2D/1MY/ ImypdodxVeAeZ70OZfI1yWVe8+MZrKt+lzrxRGwxwsLeuj1L1xwXo1zAkN011VLTY+1e UDMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=HL8PJ6WHj3xsuV0THGa9sGo6CS8j/VAHMtFF0WK5mgo=; b=lhosf6rF+xvZsIZJjXji/9y1+z5FLwK4oM1OizHT1nF6kBGB3/KkwjEv1J4xSw5Yol uPFBvN/1JaXSoJ1z6ADF3Z+2ZGFj77zl4m4o7FGLFT6651bI8HupyL+xduS+r0ECdd+t z7erQEwpwKeKmDwRn7tKhsR4tf0/Ti9xgVho0J0kiA57PrR5OZrvn5rgiiVEpyX2rDoy SB4fPifVuKa0QjhfcHxLx4TRHe9kAe7f7EZkh/MLfKK2Pxbs1m4R9r6p5+7lfo+g50MD EzhnYA+ksNNWLDVs5t6umfQ9Kq4q3jbjVXxFZyWJR470aVj/G6yqap/TOa9tvoGU3QxN ZuFQ== X-Gm-Message-State: AMCzsaU+m+bamT60tTUkD+iFsxSlTINyU2U2okmieiO2AWs/94dlmkWz LoewupfbSJWmgkSmmwWsUQo= X-Google-Smtp-Source: ABhQp+Ti6BVhTLG+pia/OwTor6C3TM38vWMrsyVslPCWn9pDGzhpPYcnK9rnvZ8UYrn9RHMvqJ5WgA== X-Received: by 10.28.34.3 with SMTP id i3mr1822968wmi.94.1507905000721; Fri, 13 Oct 2017 07:30:00 -0700 (PDT) Received: from gmail.com (dell-goyal.wifi.rsr.lip6.fr. [132.227.77.190]) by smtp.gmail.com with ESMTPSA id f3sm677735wre.66.2017.10.13.07.29.58 (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 13 Oct 2017 07:29:59 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Fri, 13 Oct 2017 16:29:58 +0200 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-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 :