From patchwork Fri Oct 13 15:00:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 10004999 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 4F715602B3 for ; Fri, 13 Oct 2017 15:01:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 40C582907E for ; Fri, 13 Oct 2017 15:01:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 35118290A0; Fri, 13 Oct 2017 15:01:06 +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 C73C92907E for ; Fri, 13 Oct 2017 15:01:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758224AbdJMPAw (ORCPT ); Fri, 13 Oct 2017 11:00:52 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:54116 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753481AbdJMPAv (ORCPT ); Fri, 13 Oct 2017 11:00:51 -0400 Received: by mail-wm0-f66.google.com with SMTP id q132so22367818wmd.2; Fri, 13 Oct 2017 08:00:50 -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=XQx0aCYM0JM7WuRs0MIo3ymQfz2pKdF9x9xKl7WxZ+Y=; b=n08kmuJjX0yDZf6doIDzUpemZh/+hnfMWGBfLqw2gmt98bGZ8YrG8PDAcrw45kpTt9 5ySd4zCh/XwCo+rBpS2rJZ1T1KDh26ik1NWhl1BeyMyJs8lEsA5tpbKnTXd86WRVL3++ lKoL8xOswr1RWOP0/DXQXXPGiAKr76VfehtY5DgFc732ImuuJOoniMXfTVHvUopqnjx9 Z7AJ7EeDy95E83EQPB7zd51UQnq1qeV5p9RiOTDBdoKPcVgnHyC4xh9pQ6fgmfL0fnZJ VghCP1wOHzPZsH+rYl0c5w8ZBZeeFsGd7cFl5xCkl0R9J+wJg22auD9F736X+/K6qKVB B3Pg== 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=XQx0aCYM0JM7WuRs0MIo3ymQfz2pKdF9x9xKl7WxZ+Y=; b=rQaouqHEV4ldRjgOtEZGkZXrJxQVYwoSrWsrfBQ+tO7Z28ziIGZYX9N/Jn/OVRIr1h CaGCyBuqHJdzh65EhjCRw/N/otJdfVwLICh0KiRlBI9Hm5M3vgkxcChOT0ca/M8d0dFx 576OX3dmtLC9XkmKQN7KFl6GCf/h7hdSOmrxpvcb0LPHO2GJFG/IdGU646VtO0VD+9gy N02lZ87I/i7zhHO5qlWDPKH1NufEQK8cxuBRVTOOQccwGRtHtL9udGQxE8R026c0F315 O3LJ9P6F47PrMeHUu7GciHLnsbGaOsgvkTtHl+lEBvVTwIRSD/5+TeOywkSQ8xj55pxA xIpQ== X-Gm-Message-State: AMCzsaVB2TaKTXJfabcTuDGi1PfvUjL2fX8o8yEbotpDp2IFjpUuQ3Dk k8GypgZ5PqIPw13+fUa3jDM= X-Google-Smtp-Source: ABhQp+QLhaK2FB1dyHF4K4t1ZOh7SbLNXk8kbYY+o5lMffTik804wztTMEXSJs7CckHyUi/oczLYfA== X-Received: by 10.28.71.194 with SMTP id m63mr1643933wmi.48.1507906849954; Fri, 13 Oct 2017 08:00:49 -0700 (PDT) Received: from gmail.com (dell-goyal.wifi.rsr.lip6.fr. [132.227.77.190]) by smtp.gmail.com with ESMTPSA id c4sm642243wre.57.2017.10.13.08.00.48 (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 13 Oct 2017 08:00:49 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Fri, 13 Oct 2017 17:00:48 +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 the function argument as const Date: Fri, 13 Oct 2017 17:00:34 +0200 Message-Id: <1507906834-31150-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 This is a followup patch for: https://lkml.org/lkml/2017/10/13/476 Make the function argument of fc_attach_transport as const as it is only stored in the const field 'f' (made const in the patch in the link) of a fc_internal structure. Signed-off-by: Bhumika Goyal --- This change allows some fc_function_template structures to be const. I will send the patches for structure constification after this gets applied. drivers/scsi/scsi_transport_fc.c | 2 +- include/scsi/scsi_transport_fc.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c index 8c46a6d..fb30ede 100644 --- a/drivers/scsi/scsi_transport_fc.c +++ b/drivers/scsi/scsi_transport_fc.c @@ -2162,7 +2162,7 @@ enum blk_eh_timer_return } struct scsi_transport_template * -fc_attach_transport(struct fc_function_template *ft) +fc_attach_transport(const struct fc_function_template *ft) { int count; struct fc_internal *i = kzalloc(sizeof(struct fc_internal), diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h index e8644ee..60fff05 100644 --- a/include/scsi/scsi_transport_fc.h +++ b/include/scsi/scsi_transport_fc.h @@ -784,7 +784,7 @@ static inline void u64_to_wwn(u64 inm, u8 *wwn) } struct scsi_transport_template *fc_attach_transport( - struct fc_function_template *); + const struct fc_function_template *); void fc_release_transport(struct scsi_transport_template *); void fc_remove_host(struct Scsi_Host *); struct fc_rport *fc_remote_port_add(struct Scsi_Host *shost,