From patchwork Mon Oct 16 15:18:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 10008633 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 C2884602B3 for ; Mon, 16 Oct 2017 15:20:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A951928595 for ; Mon, 16 Oct 2017 15:20:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9AC1128660; Mon, 16 Oct 2017 15:20:25 +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 6FBED28595 for ; Mon, 16 Oct 2017 15:20:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753538AbdJPPUD (ORCPT ); Mon, 16 Oct 2017 11:20:03 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:53711 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753925AbdJPPTx (ORCPT ); Mon, 16 Oct 2017 11:19:53 -0400 Received: by mail-wm0-f65.google.com with SMTP id q132so4474584wmd.2; Mon, 16 Oct 2017 08:19:52 -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=6RKMVDMsZG+Evl146TMZ/PixowFtCvzQjA0/ebFsUPU=; b=OYt4dVF5K0h1ismtqr3jkAf521AsvGz4WXa5wu3GPQv4hN4Ng6Paa3RTmWYjBo9Coi io55i+2xFbUzLMiObRhhPeIG+LYsHZvNMyIHBZc19nMXZFoP88D+X1aqtuE2js6V/8J6 aeNRefXYSNC0QsazvrITSz8ih+n4WfvphNF7W5CYRgfYv+afxZ3gU7696kiW11UJezNf WTtyUosDx0F1VEKHqnIwpK6DtHacCOumgGCy9GsAjHId3byxNdBN1EOUO2vjYWPV5CTl 69o4HYMmIzuIELCY0RhfZEgD6Nq1vCimIVmqGTJyU2NP/V11inwu6vhU25rxzf3qkt8T wuVg== 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=6RKMVDMsZG+Evl146TMZ/PixowFtCvzQjA0/ebFsUPU=; b=WCjapu/sbQvxHY5Te67H3t9eQqGtkSu130HehxGjOkBYPDo2nmnwc04lWShhSbvc+z GpgCfN8J0BUElkPB46GDGHyKj4F4MfP/03F7bEPNuQISyUNvoxWSaF5+85kiBs8IJGgZ Ik9952Av2jvsdiZl3L7k+qdCzmWqL42FNxKHm8oR5oRyvB6jJCE4wplLf0DPTqcr2PTx NtaVR9SaQp69Nifl2R3cszdR9QQT9NiZfCV8xk95cUJ22OAuS9YlEXQJGVygJwgL7GtY 1EvyGzXXrzLG43bbsQfH6QclOeiygirint/c7PMpUFVEiM66g83tQd4dxanCJN3K3Eup S4fw== X-Gm-Message-State: AMCzsaUCmTYClihQQyAhrz13PiAkiKNzF2Rs5EzSGlYxti4dQE+lVkrF t4iPrtLtdqQxMGKy3hNMYYI= X-Google-Smtp-Source: ABhQp+RsDuLQ5O2k1CZCS6e1rt1z+xCQedhGLAovejxo3dc/CLU6j/lEv5iWWJJYr9zdiuDYf1FhVg== X-Received: by 10.28.56.70 with SMTP id f67mr728481wma.62.1508167191295; Mon, 16 Oct 2017 08:19:51 -0700 (PDT) Received: from gmail.com (dell-goyal.wifi.rsr.lip6.fr. [132.227.77.190]) by smtp.gmail.com with ESMTPSA id v23sm3532661wmv.0.2017.10.16.08.19.48 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 16 Oct 2017 08:19:50 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Mon, 16 Oct 2017 17:19:48 +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 15/15] configfs: make config_item_type const Date: Mon, 16 Oct 2017 17:18:54 +0200 Message-Id: <1508167134-6243-16-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 --- * Changes in v2- Combine all the followup patches and the constification patches into a series. samples/configfs/configfs_sample.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/configfs/configfs_sample.c b/samples/configfs/configfs_sample.c index 1ea3311..004a4e2 100644 --- a/samples/configfs/configfs_sample.c +++ b/samples/configfs/configfs_sample.c @@ -115,7 +115,7 @@ static ssize_t childless_description_show(struct config_item *item, char *page) NULL, }; -static struct config_item_type childless_type = { +static const struct config_item_type childless_type = { .ct_attrs = childless_attrs, .ct_owner = THIS_MODULE, }; @@ -193,7 +193,7 @@ static void simple_child_release(struct config_item *item) .release = simple_child_release, }; -static struct config_item_type simple_child_type = { +static const struct config_item_type simple_child_type = { .ct_item_ops = &simple_child_item_ops, .ct_attrs = simple_child_attrs, .ct_owner = THIS_MODULE, @@ -261,7 +261,7 @@ static void simple_children_release(struct config_item *item) .make_item = simple_children_make_item, }; -static struct config_item_type simple_children_type = { +static const struct config_item_type simple_children_type = { .ct_item_ops = &simple_children_item_ops, .ct_group_ops = &simple_children_group_ops, .ct_attrs = simple_children_attrs, @@ -331,7 +331,7 @@ static ssize_t group_children_description_show(struct config_item *item, .make_group = group_children_make_group, }; -static struct config_item_type group_children_type = { +static const struct config_item_type group_children_type = { .ct_group_ops = &group_children_group_ops, .ct_attrs = group_children_attrs, .ct_owner = THIS_MODULE,