From patchwork Mon Oct 16 15:18:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 10008763 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 0663D601D5 for ; Mon, 16 Oct 2017 15:24:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EBB082861E for ; Mon, 16 Oct 2017 15:24:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DE31A28623; Mon, 16 Oct 2017 15:24:14 +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 893CD2861E for ; Mon, 16 Oct 2017 15:24:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754055AbdJPPYE (ORCPT ); Mon, 16 Oct 2017 11:24:04 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:47510 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753804AbdJPPT3 (ORCPT ); Mon, 16 Oct 2017 11:19:29 -0400 Received: by mail-wm0-f68.google.com with SMTP id t69so4459137wmt.2; Mon, 16 Oct 2017 08:19:27 -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=jJ+8RfSotZKPLt3Jm4JT+bvvytcaMEj/vmqLTDP2S+8=; b=Y79xK9F8sw+/ujmk41HW9c8Gcrho11qVr9Z7GKmYvPweijMwGi5inOb1L0aZQejlZv sFrY2YZiRH4Wppsdrg78Ziyc+aaWVyTvbKZuzDMENuUVqvmP0CMxbkXFew8ckjjtpoOy Dk+kJDmgness7L+NW9MqxiQJDShqotdCllEODRMM2g4WhZVHE70//zcJb6dofBcPKfHr nWWyRzQBFKtIMcHygqsDoWm9rpG1Bd/cnYH9MlsZePQ834v5hG5ZiNc4DiQJw+ZXc3PS AffDRocBsUoY9uzkarQbVQLQuCCRmERgP4087VUwSAzyifGJiKTfXfJtv9Tu+2bBy1Og /inQ== 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=jJ+8RfSotZKPLt3Jm4JT+bvvytcaMEj/vmqLTDP2S+8=; b=tI6Xbp2N5WPnsT4fVRSoa+KVpyFvxsaYmNY/I/680dsyJO4qNuAp/BKlpGXLoAlzzT V5ZARdE/15UCC5QpM/0uUt0awW8jON5Jo1L+dU2ONwhieWqLmZSJ6/gTrMMMLoUcMaDU PHxQcNL50NJmu+NL3fBxX2QeJ/1yYllq+0MGsIJut8QSYZCA2G0haYa+5kjGGKW0OPYO 5kdBzNWPb98rALhxkZhQ2ECkqksNSV2bjLS4+2/ownhDE9iurJlxbavnSvHKF+k/5kAn PBXoji2je+ZWIfw9s0FuszU4zJwo02xp6ze8i4Vvl9ANHvVFRIAvtMCZmqE+MewkDx5M 0LFg== X-Gm-Message-State: AMCzsaWglxkkaTTtqIFxQQ+cEoFpzx6EOvpFEbilCGpXIWESZbCWkjk8 CJYFHw3I7LGIG/ruWvq0RmQ= X-Google-Smtp-Source: ABhQp+Q8Tzc+m7unIaQL6sSe3QT+P+ZUBwiiufFSrKh0BskF5JEyoVrDgE0NhsSFaFP5sTgcH82aYQ== X-Received: by 10.28.69.8 with SMTP id s8mr1052847wma.65.1508167165399; Mon, 16 Oct 2017 08:19:25 -0700 (PDT) Received: from gmail.com (dell-goyal.wifi.rsr.lip6.fr. [132.227.77.190]) by smtp.gmail.com with ESMTPSA id i16sm13329597wrf.19.2017.10.16.08.19.23 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 16 Oct 2017 08:19:24 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Mon, 16 Oct 2017 17:19:23 +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 07/15] usb: gadget: configfs: make config_item_type const Date: Mon, 16 Oct 2017 17:18:46 +0200 Message-Id: <1508167134-6243-8-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 stored in the const "ci_type" field of a config_item structure. Done using Coccinelle. Signed-off-by: Bhumika Goyal Acked-by: Felipe Balbi --- * Changes in v2- Combine all the followup patches and the constification patches into a series. drivers/usb/gadget/configfs.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c index aeb9f3c..9d18b99 100644 --- a/drivers/usb/gadget/configfs.c +++ b/drivers/usb/gadget/configfs.c @@ -505,13 +505,13 @@ static ssize_t gadget_config_desc_bmAttributes_store(struct config_item *item, NULL, }; -static struct config_item_type gadget_config_type = { +static const struct config_item_type gadget_config_type = { .ct_item_ops = &gadget_config_item_ops, .ct_attrs = gadget_config_attrs, .ct_owner = THIS_MODULE, }; -static struct config_item_type gadget_root_type = { +static const struct config_item_type gadget_root_type = { .ct_item_ops = &gadget_root_item_ops, .ct_attrs = gadget_root_attrs, .ct_owner = THIS_MODULE, @@ -593,7 +593,7 @@ static void function_drop( .drop_item = &function_drop, }; -static struct config_item_type functions_type = { +static const struct config_item_type functions_type = { .ct_group_ops = &functions_ops, .ct_owner = THIS_MODULE, }; @@ -694,7 +694,7 @@ static void config_desc_drop( .drop_item = &config_desc_drop, }; -static struct config_item_type config_desc_type = { +static const struct config_item_type config_desc_type = { .ct_group_ops = &config_desc_ops, .ct_owner = THIS_MODULE, }; @@ -1476,7 +1476,7 @@ static void gadgets_drop(struct config_group *group, struct config_item *item) .drop_item = &gadgets_drop, }; -static struct config_item_type gadgets_type = { +static const struct config_item_type gadgets_type = { .ct_group_ops = &gadgets_ops, .ct_owner = THIS_MODULE, };