From patchwork Mon Oct 16 15:18:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 10008623 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 280BC601D5 for ; Mon, 16 Oct 2017 15:19:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 190C626E76 for ; Mon, 16 Oct 2017 15:19:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0D85627D4A; Mon, 16 Oct 2017 15:19:35 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 B959526E76 for ; Mon, 16 Oct 2017 15:19:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753860AbdJPPTc (ORCPT ); Mon, 16 Oct 2017 11:19:32 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:57183 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753774AbdJPPTZ (ORCPT ); Mon, 16 Oct 2017 11:19:25 -0400 Received: by mail-wm0-f66.google.com with SMTP id l68so4432101wmd.5; Mon, 16 Oct 2017 08:19:23 -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:in-reply-to:references; bh=8Jisqxw7A/ZtIMfpfNeZkI06QYwTeoJ8cJPTYsVTubo=; b=FCy/W+hlZqM0DdV+elJg99MrW/X1D4YFX55fTPYWUf/QFxmoa1gO4fJvGar1v6wpOg w4AZG3nasDD/76SODqf7oxwlPZR3iqt84PEaCHpfyIfYOImcRSSaALjVZ+rhdMUMvTyj xh/UzaLp2sBt5nW898KZNzFF7HXvG5xhvq/+ojANTNiPrlT8Ah61ppJdc0bLuSvG5gy+ g3ChYMyX5lFz9aJJCiAJf8z7U2EvC3g/QwwMDhcNDkKqdiMiCm1eSkXsUs4dJNu5i0qi Z6dqN7zQiLNkhS+dpTCOBlPyG4AGXQpWoPRoA5UW1fddAdoBhtS0QBqgssR9hgOn7O14 WWVQ== 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:in-reply-to :references; bh=8Jisqxw7A/ZtIMfpfNeZkI06QYwTeoJ8cJPTYsVTubo=; b=dG6IYLl5qSrpOz7G7UP+z4MnXmcXxzmefq2ZbKpsyFA0Ua2rb//7fGT66BD7WQzD+f K7o5FB1GbSyzM8rsFGoYd7YFO/4JgnVhQikMxZAUEMxDQG9FVpC+pyCYYpGuvvCeao4C HCQhvto9QzAUJELtJolrSH/1JLt1OXxF5Wziq7Zfvp534VseLXrh3DFOiFPzZOIcFKoT BkPg2WNjBBxvEBXYKroZ4BNFVxU+2rYiy40fPpqSsstwx8ESbzQIqnPrJK2+tWb0ds3U xmaEoF26K/mK2Eo//Tq0xiRzCDfczM7X+m8BBjLStwC6QHWE/aXOVJdz718d1h6Qkhvn TEAQ== X-Gm-Message-State: AMCzsaVAPy+CdT7qTTpfG/vhPzhW1OkR3XZlRIr3A3hpElmetbRXCvx0 jbW1YhnWmxoI/UTCFfvrlZY= X-Google-Smtp-Source: ABhQp+RD4TQ6QV1LOpY2StLIuzwQNcCmN8rJcEkJDhYLnjtCRQhtnkB5mQ95QNA7gfS1Fc8OK4AD9A== X-Received: by 10.223.186.140 with SMTP id p12mr856257wrg.235.1508167162791; Mon, 16 Oct 2017 08:19:22 -0700 (PDT) Received: from gmail.com (dell-goyal.wifi.rsr.lip6.fr. [132.227.77.190]) by smtp.gmail.com with ESMTPSA id d1sm2036436wre.85.2017.10.16.08.19.20 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 16 Oct 2017 08:19:22 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Mon, 16 Oct 2017 17:19:20 +0200 From: Bhumika Goyal To: julia.lawall@lip6.fr, rjw@rjwysocki.net, lenb@kernel.org, alexander.shishkin@linux.intel.com, jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, dledford@redhat.com, sean.hefty@intel.com, hal.rosenstock@gmail.com, hch@lst.de, sagi@grimberg.me, kishon@ti.com, bhelgaas@google.com, nab@linux-iscsi.org, balbi@kernel.org, gregkh@linuxfoundation.org, laurent.pinchart@ideasonboard.com, jlbec@evilplan.org, ccaulfie@redhat.com, teigland@redhat.com, mfasheh@versity.com, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, linux-rdma@vger.kernel.org, netdev@vger.kernel.org, linux-nvme@lists.infradead.org, linux-pci@vger.kernel.org, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-usb@vger.kernel.org, cluster-devel@redhat.com, ocfs2-devel@oss.oracle.com, linux-fsdevel@vger.kernel.org Cc: Bhumika Goyal Subject: [PATCH v2 06/15] PCI: endpoint: make config_item_type const Date: Mon, 16 Oct 2017 17:18:45 +0200 Message-Id: <1508167134-6243-7-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1508167134-6243-1-git-send-email-bhumirks@gmail.com> References: <1508167134-6243-1-git-send-email-bhumirks@gmail.com> Sender: target-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: target-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Make config_item_type structures const as they are either passed to a function having the argument as const or stored in the const "ci_type" field of a config_item structure. Done using Coccinelle. Signed-off-by: Bhumika Goyal Acked-by: Bjorn Helgaas --- * Changes in v2- Combine all the followup patches and the constification patches into a series. drivers/pci/endpoint/pci-ep-cfs.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/pci/endpoint/pci-ep-cfs.c b/drivers/pci/endpoint/pci-ep-cfs.c index 424fdd6..4f74386 100644 --- a/drivers/pci/endpoint/pci-ep-cfs.c +++ b/drivers/pci/endpoint/pci-ep-cfs.c @@ -150,7 +150,7 @@ static void pci_epc_epf_unlink(struct config_item *epc_item, .drop_link = pci_epc_epf_unlink, }; -static struct config_item_type pci_epc_type = { +static const struct config_item_type pci_epc_type = { .ct_item_ops = &pci_epc_item_ops, .ct_attrs = pci_epc_attrs, .ct_owner = THIS_MODULE, @@ -361,7 +361,7 @@ static void pci_epf_release(struct config_item *item) .release = pci_epf_release, }; -static struct config_item_type pci_epf_type = { +static const struct config_item_type pci_epf_type = { .ct_item_ops = &pci_epf_ops, .ct_attrs = pci_epf_attrs, .ct_owner = THIS_MODULE, @@ -400,7 +400,7 @@ static void pci_epf_drop(struct config_group *group, struct config_item *item) .drop_item = &pci_epf_drop, }; -static struct config_item_type pci_epf_group_type = { +static const struct config_item_type pci_epf_group_type = { .ct_group_ops = &pci_epf_group_ops, .ct_owner = THIS_MODULE, }; @@ -428,15 +428,15 @@ void pci_ep_cfs_remove_epf_group(struct config_group *group) } EXPORT_SYMBOL(pci_ep_cfs_remove_epf_group); -static struct config_item_type pci_functions_type = { +static const struct config_item_type pci_functions_type = { .ct_owner = THIS_MODULE, }; -static struct config_item_type pci_controllers_type = { +static const struct config_item_type pci_controllers_type = { .ct_owner = THIS_MODULE, }; -static struct config_item_type pci_ep_type = { +static const struct config_item_type pci_ep_type = { .ct_owner = THIS_MODULE, };