From patchwork Mon Oct 16 15:18:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 10008693 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 41174601D5 for ; Mon, 16 Oct 2017 15:21:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 31E9D28595 for ; Mon, 16 Oct 2017 15:21:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 266DA285CA; Mon, 16 Oct 2017 15:21:58 +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 D858028595 for ; Mon, 16 Oct 2017 15:21:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753986AbdJPPVu (ORCPT ); Mon, 16 Oct 2017 11:21:50 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:47589 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752950AbdJPPTn (ORCPT ); Mon, 16 Oct 2017 11:19:43 -0400 Received: by mail-wm0-f66.google.com with SMTP id t69so4461636wmt.2; Mon, 16 Oct 2017 08:19:41 -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=oAjYTux5fn0KTlQxYrzyy3ythPqqKA906lfvKKC6NGc=; b=rdqESS9D2sLsYr/fo1S3T3u9rxtH/ft77SeHYMq0K2G/jcB/TwRlRQdRPWr1jVvtyt KV/hwJlSGQFEtUCqGG9dBpz2GS5ZjCr8zDqq8JXmeHWgSyoPpKXrSjPKdunPZ1LhzkxK jjz+QCpPGgSFOAs9bGrN0ldX6tYTd5mx4i0vFJWQywt079REIeTWbZzg5wGHfdTOejyM TUYA9mcb0P4hmMUCNGjjzgjme4FdmDPwkFDsgEMMX2TLjIUfCjk/QYSqiXzXrNGHSOwh 2wmoleo+0Uve5B27f9gFq0qQhn0Ld0xFbWPl+skI26Y//NPHsI3TxOUz4ZG2J3W+aybv nmhA== 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=oAjYTux5fn0KTlQxYrzyy3ythPqqKA906lfvKKC6NGc=; b=NTWJd1EyqNUTbGMJVlpZeKCHBvHtPrhDVq4Dkbk9Hs4+LK1IRTdWHlE8Hx1Isg90hs zD+xNAXYn//ycRyilaVPrInJYN1TQ/LJ5Bzqrw20brRp2XUE+9aO8GAlRirnAhQVpeHR V3AfmX6Hsx6+JafNBUwHQ3cIa+GLv46rZRDcePgeze2akyaoKI0cig69vzMOJozS0qlG vw9bZReSlvNFxDuT7M+YpgIH0zW8rz9DX+gBXxbdUKunbrq/InfBKcBnYXDtlA/mhzXH g3XiT1BboBscZOOpO3n0hh9wMvCFfaS4CGaJjt7Oc0ppNukuGReAE5p7P1yye0i1fLJG Q2uQ== X-Gm-Message-State: AMCzsaUbWznDaQnJiwhQbn7cqQCYF/JL3fTjw+pYdvhK7rGzzRpGDN87 EGmawfMg68BAiO+eKD3P4HM= X-Google-Smtp-Source: ABhQp+TzhUonQTTNc+ZXyhGX1M6frQsZMvLG7F3aiU45pBH3BkXXfVA9Bn0oUXgGF9o8+WvYPMDUKg== X-Received: by 10.28.150.194 with SMTP id y185mr1115432wmd.54.1508167179957; Mon, 16 Oct 2017 08:19:39 -0700 (PDT) Received: from gmail.com (dell-goyal.wifi.rsr.lip6.fr. [132.227.77.190]) by smtp.gmail.com with ESMTPSA id j2sm7435106wrj.82.2017.10.16.08.19.37 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 16 Oct 2017 08:19:39 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Mon, 16 Oct 2017 17:19:37 +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 12/15] RDMA/cma: make config_item_type const Date: Mon, 16 Oct 2017 17:18:51 +0200 Message-Id: <1508167134-6243-13-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 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. Signed-off-by: Bhumika Goyal Reviewed-by: Leon Romanovsky Acked-by: Doug Ledford --- * Changes in v2- Combine all the followup patches and the constification patches into a series. drivers/infiniband/core/cma_configfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/infiniband/core/cma_configfs.c b/drivers/infiniband/core/cma_configfs.c index 54076a3..31dfee0 100644 --- a/drivers/infiniband/core/cma_configfs.c +++ b/drivers/infiniband/core/cma_configfs.c @@ -186,7 +186,7 @@ static ssize_t default_roce_tos_store(struct config_item *item, NULL, }; -static struct config_item_type cma_port_group_type = { +static const struct config_item_type cma_port_group_type = { .ct_attrs = cma_configfs_attributes, .ct_owner = THIS_MODULE }; @@ -263,7 +263,7 @@ static void release_cma_ports_group(struct config_item *item) .release = release_cma_ports_group }; -static struct config_item_type cma_ports_group_type = { +static const struct config_item_type cma_ports_group_type = { .ct_item_ops = &cma_ports_item_ops, .ct_owner = THIS_MODULE }; @@ -272,7 +272,7 @@ static void release_cma_ports_group(struct config_item *item) .release = release_cma_dev }; -static struct config_item_type cma_device_group_type = { +static const struct config_item_type cma_device_group_type = { .ct_item_ops = &cma_device_item_ops, .ct_owner = THIS_MODULE }; @@ -323,7 +323,7 @@ static struct config_group *make_cma_dev(struct config_group *group, .make_group = make_cma_dev, }; -static struct config_item_type cma_subsys_type = { +static const struct config_item_type cma_subsys_type = { .ct_group_ops = &cma_subsys_group_ops, .ct_owner = THIS_MODULE, };