From patchwork Mon Oct 16 15:18:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 10008651 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 9506A601D5 for ; Mon, 16 Oct 2017 15:20:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7FE392861E for ; Mon, 16 Oct 2017 15:20:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7E03628604; Mon, 16 Oct 2017 15:20:41 +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 853B128622 for ; Mon, 16 Oct 2017 15:20:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753923AbdJPPTv (ORCPT ); Mon, 16 Oct 2017 11:19:51 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:49126 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753895AbdJPPTr (ORCPT ); Mon, 16 Oct 2017 11:19:47 -0400 Received: by mail-wm0-f66.google.com with SMTP id i124so4408239wmf.3; Mon, 16 Oct 2017 08:19:45 -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=Y4DWk3A6K60MvgtU+tTEycFymvs6gbmutR0qbNgv04o=; b=WgBdYv1kEn6wXOrP5SIZJaKMKXogRTboy+cK5lTH4n5tXaeTYjnJU6M0iebmEp6xat UQmabogB/3HWdmQbYl4d1q1qPNhxPgqcKNs0kTtuaL9NM7MNckZBocbgyrgUHg3FHZRT BWHJv69XNf1KJZtx+NRODKHzfN7MkturSAC/s2FvEU3X2ig1sA/PB8XMM2DF1FbfYtCj JLncux2gKxFQQJi2rMM2r/5wRNxgcx0c7N440PVRPN2/rf891MISxlLCSMR8KMWi5JBa YOP9BsEQad7jYDY60oDTsMxSAhhFle08ZQ1macQBogMWA7SXbPtdetOdgjmOou28VXQx dSZg== 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=Y4DWk3A6K60MvgtU+tTEycFymvs6gbmutR0qbNgv04o=; b=n7uv1pjBuY0T8DNAst9LIlxsbmM1Dis5pNJMmOlCJjYJ+/NkuabRZe35vwaDW7NPAn wsGU7J2w1CfgVNfhE7Tf0nxhEG2ULuO49GrM6KaVh0QF33w4+NWPyGA94JrX0gO0EF1l 4aIBUilZq0KHoSogrYc1+2Lz9BLZn/3vd+6l0uSN92VY6986wux9k+/5CixGfY3RNr0l luLWJA5g1abTUsMHGbZ9uMJtZDLhUAylttXdb1kx2mQqaMmm51XZ03ClyZccKJK0yu9s oJuQP88cDhMYQ84Ydneh90YUdMIeb8KxDCD54KFCErR+B0P1SDlUu3WZQ1SjLeiz/JMG NAYw== X-Gm-Message-State: AMCzsaWdpq1ooH3iiXwDlwdLPIJhAyLt5Bj++gYYUCyG5haTalpSh+gS /SVWr1hVZJ00dKs92u87bFY= X-Google-Smtp-Source: ABhQp+SHWH+rqU/npMqxkT6Z9+XnnXO4uxPhBccweoeUe/nyDEfABqIbdzOwkJ9ACjKdm9LoKSOSRw== X-Received: by 10.223.179.1 with SMTP id j1mr971887wrd.105.1508167184918; Mon, 16 Oct 2017 08:19:44 -0700 (PDT) Received: from gmail.com (dell-goyal.wifi.rsr.lip6.fr. [132.227.77.190]) by smtp.gmail.com with ESMTPSA id p78sm10046923wma.11.2017.10.16.08.19.40 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 16 Oct 2017 08:19:44 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Mon, 16 Oct 2017 17:19:40 +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 13/15] netconsole: make config_item_type const Date: Mon, 16 Oct 2017 17:18:52 +0200 Message-Id: <1508167134-6243-14-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-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@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/net/netconsole.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index 0e27920..be9aa36 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c @@ -616,7 +616,7 @@ static void netconsole_target_release(struct config_item *item) .release = netconsole_target_release, }; -static struct config_item_type netconsole_target_type = { +static const struct config_item_type netconsole_target_type = { .ct_attrs = netconsole_target_attrs, .ct_item_ops = &netconsole_target_item_ops, .ct_owner = THIS_MODULE, @@ -682,7 +682,7 @@ static void drop_netconsole_target(struct config_group *group, .drop_item = drop_netconsole_target, }; -static struct config_item_type netconsole_subsys_type = { +static const struct config_item_type netconsole_subsys_type = { .ct_group_ops = &netconsole_subsys_group_ops, .ct_owner = THIS_MODULE, };