From patchwork Mon Oct 16 15:18:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 10008785 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 EB3A2601D5 for ; Mon, 16 Oct 2017 15:24:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DC04A212E8 for ; Mon, 16 Oct 2017 15:24:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CFEFE285ED; Mon, 16 Oct 2017 15:24:52 +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=ham 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 71044212E8 for ; Mon, 16 Oct 2017 15:24:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752477AbdJPPYt (ORCPT ); Mon, 16 Oct 2017 11:24:49 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:55192 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753724AbdJPPTX (ORCPT ); Mon, 16 Oct 2017 11:19:23 -0400 Received: by mail-wm0-f66.google.com with SMTP id i124so4460719wmf.3; Mon, 16 Oct 2017 08:19:20 -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=tHt6p5iAPU9uULv5yRc1EXusJ5CNYDPMq+rmPrwzLEA=; b=P8hiPDYQ7FWvGRqpUxfOlO5U+3tO6gLD7nsFVP4GpHuXXVs70Tacj2A8KOHF9SKiZN lMWQufWojapjGdwLr7VUdsbCDgDkq9Ugrk7kB/RxpH1vsh7Qd/M5Z6SuJlbsGq2fG188 1mum5681iHF87Yc1RS3z9R2NWnYz7CGltA89ZnnxxT2r/gDg5zATVkkfzw+pBZVrpeFx t9lvVm8nqk0Cg/Wdm1j0pR1H8fDd+WyUN4mSD/q6I6CE4qroqwpv9UUXlQKCU/Kw6oOo KfGikXsMUtX0WiuHnFBVccM3ZUxy//9deWrp+Gzy+OneWG6bITiJ7dhgU5PApR/MGz/w L2hw== 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=tHt6p5iAPU9uULv5yRc1EXusJ5CNYDPMq+rmPrwzLEA=; b=cw228cjXUjp7OBMd6YWi8ZkXRSjnUkTMI76apuAwN+XO++DBRXhQlKW1Z6LLTbR2K7 EIKIkv4KuYCmJBI8hMhVKIGV9C25dnYcZfxhdDZ59yGg4fGsjjn+6rvvtL48iiO1PBmv EEgOWJeLDi1ddw3D42FcKAFzzASAD6USfbMiAkfIrL0tJwRqH112S6SNQdp7w0KV39kh pYsOQwpgPkqXaLDhxH+qpNUtV4NblZiwkGUvG8KzvU58GI8Mm7d+qXYWk4A2gDr6xtlE f8HUrXuOg6IaMs8jqkWyHZ0TDGI6fUGQNMfJdqkD5EUmfjOJHDqE4APL5WmmN2Ya45af OhUQ== X-Gm-Message-State: AMCzsaXi3ps23DV8YJHp5HJ8u2rUbMNfb07DvcCXzcb3awa67Y37j11r n/S1JdB9W7aVLMw7KsGR5oA= X-Google-Smtp-Source: ABhQp+TV8Hs0xB03fkEZ6da0rsqhZc6UYDU/jBPBDEwB6LY0eGwyII0urcNPwYflev2cLFHcoux55A== X-Received: by 10.28.156.23 with SMTP id f23mr1313278wme.128.1508167160189; Mon, 16 Oct 2017 08:19:20 -0700 (PDT) Received: from gmail.com (dell-goyal.wifi.rsr.lip6.fr. [132.227.77.190]) by smtp.gmail.com with ESMTPSA id b190sm8655214wma.22.2017.10.16.08.19.17 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 16 Oct 2017 08:19:19 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Mon, 16 Oct 2017 17:19:18 +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 05/15] ocfs2/cluster: make config_item_type const Date: Mon, 16 Oct 2017 17:18:44 +0200 Message-Id: <1508167134-6243-6-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: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Make these structures const as they are either passed to the functions having the argument as const or stored as a reference in the "ci_type" const field of a config_item structure. Done using Coccinelle. Signed-off-by: Bhumika Goyal --- * Changes in v2- Combine all the followup patches and the constification patches into a series. fs/ocfs2/cluster/heartbeat.c | 4 ++-- fs/ocfs2/cluster/nodemanager.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c index d020604..ea8c551 100644 --- a/fs/ocfs2/cluster/heartbeat.c +++ b/fs/ocfs2/cluster/heartbeat.c @@ -2025,7 +2025,7 @@ static ssize_t o2hb_region_pid_show(struct config_item *item, char *page) .release = o2hb_region_release, }; -static struct config_item_type o2hb_region_type = { +static const struct config_item_type o2hb_region_type = { .ct_item_ops = &o2hb_region_item_ops, .ct_attrs = o2hb_region_attrs, .ct_owner = THIS_MODULE, @@ -2310,7 +2310,7 @@ static ssize_t o2hb_heartbeat_group_mode_store(struct config_item *item, .drop_item = o2hb_heartbeat_group_drop_item, }; -static struct config_item_type o2hb_heartbeat_group_type = { +static const struct config_item_type o2hb_heartbeat_group_type = { .ct_group_ops = &o2hb_heartbeat_group_group_ops, .ct_attrs = o2hb_heartbeat_group_attrs, .ct_owner = THIS_MODULE, diff --git a/fs/ocfs2/cluster/nodemanager.c b/fs/ocfs2/cluster/nodemanager.c index b17d180..a51200e 100644 --- a/fs/ocfs2/cluster/nodemanager.c +++ b/fs/ocfs2/cluster/nodemanager.c @@ -378,7 +378,7 @@ static ssize_t o2nm_node_local_store(struct config_item *item, const char *page, .release = o2nm_node_release, }; -static struct config_item_type o2nm_node_type = { +static const struct config_item_type o2nm_node_type = { .ct_item_ops = &o2nm_node_item_ops, .ct_attrs = o2nm_node_attrs, .ct_owner = THIS_MODULE, @@ -619,7 +619,7 @@ static void o2nm_node_group_drop_item(struct config_group *group, .drop_item = o2nm_node_group_drop_item, }; -static struct config_item_type o2nm_node_group_type = { +static const struct config_item_type o2nm_node_group_type = { .ct_group_ops = &o2nm_node_group_group_ops, .ct_owner = THIS_MODULE, }; @@ -637,7 +637,7 @@ static void o2nm_cluster_release(struct config_item *item) .release = o2nm_cluster_release, }; -static struct config_item_type o2nm_cluster_type = { +static const struct config_item_type o2nm_cluster_type = { .ct_item_ops = &o2nm_cluster_item_ops, .ct_attrs = o2nm_cluster_attrs, .ct_owner = THIS_MODULE, @@ -722,7 +722,7 @@ static void o2nm_cluster_group_drop_item(struct config_group *group, struct conf .drop_item = o2nm_cluster_group_drop_item, }; -static struct config_item_type o2nm_cluster_group_type = { +static const struct config_item_type o2nm_cluster_group_type = { .ct_group_ops = &o2nm_cluster_group_group_ops, .ct_owner = THIS_MODULE, };