From patchwork Mon Oct 16 15:18:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 10008707 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 A3698601D5 for ; Mon, 16 Oct 2017 15:22:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 940B228595 for ; Mon, 16 Oct 2017 15:22:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8875D285DC; Mon, 16 Oct 2017 15:22:32 +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=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 40D2428595 for ; Mon, 16 Oct 2017 15:22:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754005AbdJPPWZ (ORCPT ); Mon, 16 Oct 2017 11:22:25 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:52449 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753774AbdJPPTg (ORCPT ); Mon, 16 Oct 2017 11:19:36 -0400 Received: by mail-wm0-f67.google.com with SMTP id k4so4486247wmc.1; Mon, 16 Oct 2017 08:19:34 -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=sEffZ+lNae14fRGRadV9cb7iTK0/4epStOyWUSJHIEY=; b=BPJisOJYEbw9LWBXgvT4kgKUTXMswOxmKpqFLPrY7pqTiWt4W2U3LMqlMzT3YURUCn VY60XKD2Jq2GwZaNc7oCKop+6D1r+SSpurHRhJNfsdL/1zNDXAxddKjUWb6Vm+dBwGFw EnEYDldKwOLMgiL98/OLDhzUCxBX/gunqrGicFuw6uRIhjLQp1wkMXNYFkXnfFSLet8E BXO7ZZP+IFeyJJK0106jlmfY0iHTT1HM3WBV1uQj6VK/XUj3YKWDHAHPd4HmvgqJAhpm m2vHJTUY/gJuH1VbFqZh5RhxicrYonR+SXZsNbaDDwyuf8PaX76WwJrtY48HZMxnB9wQ X+bQ== 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=sEffZ+lNae14fRGRadV9cb7iTK0/4epStOyWUSJHIEY=; b=Ymp39UTw2pZ3PDWZ7JGsKY/EuEKugn3jUQdVByfWvBLiEzHQmxxbk6po09SsBI+xZq jJUki6HNO/t0fmymTs45YGEGAKZ4zQVTjPZObWOsuBPntuCMt3rGIXTLFFd208EXzRRM JcTKHCp7CK3BWBtN11Dv9LnwfJbquLf601xFLbNBnujfboc44uOujGThdxess907UElw 6jas0iZhwTDCNIPHiLICH/ImlgUg8MvtAktNd3Taje0rG5HdF2s/+hCdUd3cCaLROIyB jlzxf+GzUpaSabPiHfc0WxM5L0mm7V37aCRb1liArtZ4IKy1Lyau8v+J+hTtVEZ7KitJ aprA== X-Gm-Message-State: AMCzsaW9L+xcmXhC9B7zuYckmzfMR7JplJnyo1Vw5Fop2CWxPCpqbqmp WQEv96MdLVit/LYhhegR+2A= X-Google-Smtp-Source: ABhQp+SX1BCtJKJjo7NmeE4LuZMw+O9+41tyecMgHIQCSQ4aUbvRrUr6ehqZXHRelQqTaJE66j5+nQ== X-Received: by 10.28.51.19 with SMTP id z19mr1123215wmz.18.1508167173997; Mon, 16 Oct 2017 08:19:33 -0700 (PDT) Received: from gmail.com (dell-goyal.wifi.rsr.lip6.fr. [132.227.77.190]) by smtp.gmail.com with ESMTPSA id g16sm6612925wrd.72.2017.10.16.08.19.31 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 16 Oct 2017 08:19:33 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Mon, 16 Oct 2017 17:19:31 +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 10/15] nullb: make config_item_type const Date: Mon, 16 Oct 2017 17:18:49 +0200 Message-Id: <1508167134-6243-11-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 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 Coccienlle. Signed-off-by: Bhumika Goyal --- * Changes in v2- Combine all the followup patches and the constification patches into a series. drivers/block/null_blk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c index bf2c8ca..46b6008 100644 --- a/drivers/block/null_blk.c +++ b/drivers/block/null_blk.c @@ -480,7 +480,7 @@ static void nullb_device_release(struct config_item *item) .release = nullb_device_release, }; -static struct config_item_type nullb_device_type = { +static const struct config_item_type nullb_device_type = { .ct_item_ops = &nullb_device_ops, .ct_attrs = nullb_device_attrs, .ct_owner = THIS_MODULE, @@ -532,7 +532,7 @@ static ssize_t memb_group_features_show(struct config_item *item, char *page) .drop_item = nullb_group_drop_item, }; -static struct config_item_type nullb_group_type = { +static const struct config_item_type nullb_group_type = { .ct_group_ops = &nullb_group_ops, .ct_attrs = nullb_group_attrs, .ct_owner = THIS_MODULE,