From patchwork Mon Oct 16 15:18:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 10008677 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 8BDBA601D5 for ; Mon, 16 Oct 2017 15:21:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C90928595 for ; Mon, 16 Oct 2017 15:21:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7156C285CA; Mon, 16 Oct 2017 15:21:27 +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 2D45B28595 for ; Mon, 16 Oct 2017 15:21:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753896AbdJPPTp (ORCPT ); Mon, 16 Oct 2017 11:19:45 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:57262 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753877AbdJPPTj (ORCPT ); Mon, 16 Oct 2017 11:19:39 -0400 Received: by mail-wm0-f68.google.com with SMTP id l68so4434355wmd.5; Mon, 16 Oct 2017 08:19:37 -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=XOOZFt79zgAN+U/r/9AY1uKAfp/G9ydbuJYZFFJLpw0=; b=h2Pn7r2Hzcsek9Od1Qm6H5aruKq/RH+aG85V/mRRKk56bVzamw4oBr/H+ALyDppuyk VaykSM8gdG+/qfj8U+GcfkWEf7u3K2aWhSPp59s8ibp9VkQkdT6Qaf/gQP8g50RxQa3Y zBjDRXul/gIvhYoceCapxXCjPd2AUFJiA25zYq5uubNBKzQFPvy0yuIaP3UhrYwM2+R2 BHwCDCarUDzyPhomTNq4LOPSmS1HEBLF/hCu5GCXyU9RwBRARmT85PduJsE5KU5XG+ob b4DlHYfAjp8ZX6kvYd5PxPJAeh7u3QxBoV7Eh+Tk9TvoMiHEVlm8t1/OrTl5XZMmULJn rd8Q== 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=XOOZFt79zgAN+U/r/9AY1uKAfp/G9ydbuJYZFFJLpw0=; b=XIzxBQpsYUTr5dGNswDXP2XQGinTkv2JPkyz8BFgorPL1H4c++LSSwX5TkWadmJ7qJ uoJil8c/rY9vbbkhRrh7EEblIzrQdnvUgkpeHwHheRk8sOduyILbIpMHcJGa4wzv4NNb 0L+gOD1ST5UGxM3yj6A4rvWtICjLNQzcPbft3w2KO0Kz7ZXvDxc85y3XFyoTepBEC7PN qCPqHINUozsrvq5ZFVeVATqsaE2+16OaqoDIIombyrrDBpCwR8G8YExM1jh47gBVW73t sz3AASeSa5ZpmBUpbL87XXOhuHlesNTam00kAZ75CBKmgm6QPJI65FiImPgIRxH3dyPB XEHg== X-Gm-Message-State: AMCzsaU9rfY0ysndL5MK1mvjeHuVxhAksWzlCxTHJUUztJgoyMUJxV5o 88saP8c3rZI41jC36qjVtn8= X-Google-Smtp-Source: ABhQp+S3GektJhYq8cEWN/OQN33btZFqx/YAL4e+BYONqEnVyAHXyoj0s+ounBUFxGrd5ySdYrii0w== X-Received: by 10.223.130.42 with SMTP id 39mr986866wrb.241.1508167176809; Mon, 16 Oct 2017 08:19:36 -0700 (PDT) Received: from gmail.com (dell-goyal.wifi.rsr.lip6.fr. [132.227.77.190]) by smtp.gmail.com with ESMTPSA id p20sm8610734wma.0.2017.10.16.08.19.34 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 16 Oct 2017 08:19:36 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Mon, 16 Oct 2017 17:19:34 +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 11/15] stm class: make config_item_type const Date: Mon, 16 Oct 2017 17:18:50 +0200 Message-Id: <1508167134-6243-12-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-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@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 used inside a if statement or stored in the const "ci_type" field of a config_item structure. Done using Coccinelle. Signed-off-by: Bhumika Goyal Acked-by: Greg Kroah-Hartman --- * Changes in v2- Combine all the followup patches and the constification patches into a series. drivers/hwtracing/stm/policy.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/hwtracing/stm/policy.c b/drivers/hwtracing/stm/policy.c index 6c0ae29..33e9a1b 100644 --- a/drivers/hwtracing/stm/policy.c +++ b/drivers/hwtracing/stm/policy.c @@ -187,8 +187,8 @@ static void stp_policy_node_release(struct config_item *item) NULL, }; -static struct config_item_type stp_policy_type; -static struct config_item_type stp_policy_node_type; +static const struct config_item_type stp_policy_type; +static const struct config_item_type stp_policy_node_type; static struct config_group * stp_policy_node_make(struct config_group *group, const char *name) @@ -236,7 +236,7 @@ static void stp_policy_node_release(struct config_item *item) .drop_item = stp_policy_node_drop, }; -static struct config_item_type stp_policy_node_type = { +static const struct config_item_type stp_policy_node_type = { .ct_item_ops = &stp_policy_node_item_ops, .ct_group_ops = &stp_policy_node_group_ops, .ct_attrs = stp_policy_node_attrs, @@ -311,7 +311,7 @@ static void stp_policy_release(struct config_item *item) .make_group = stp_policy_node_make, }; -static struct config_item_type stp_policy_type = { +static const struct config_item_type stp_policy_type = { .ct_item_ops = &stp_policy_item_ops, .ct_group_ops = &stp_policy_group_ops, .ct_attrs = stp_policy_attrs, @@ -380,7 +380,7 @@ static void stp_policy_release(struct config_item *item) .make_group = stp_policies_make, }; -static struct config_item_type stp_policies_type = { +static const struct config_item_type stp_policies_type = { .ct_group_ops = &stp_policies_group_ops, .ct_owner = THIS_MODULE, };