From patchwork Thu Oct 12 12:50:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 824816 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-pci-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="p12qW1I/"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yCW180BDFz9t2c for ; Thu, 12 Oct 2017 23:50:52 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752314AbdJLMuu (ORCPT ); Thu, 12 Oct 2017 08:50:50 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:57049 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751092AbdJLMut (ORCPT ); Thu, 12 Oct 2017 08:50:49 -0400 Received: by mail-wm0-f67.google.com with SMTP id l68so13046435wmd.5; Thu, 12 Oct 2017 05:50:48 -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; bh=XSyeuEWToydbXAkDNw69/d3BXoQq0N+79c7KNTuacL8=; b=p12qW1I//E/GyxQAmLY3xnDJ8iqna2uZsq7jT1Yn/jX0fg/amY6/35CtftiS6TSNle 5MIMLWjWNWNs7oU8PIDFHZC33RaJAznEiuNddyuaW0LFMVTSERp5bL/E10/cRwI3PkgS CKaKj89ShkurlBeWj6yGqGxf8+yk5IQQdFHQ0F/1i4VA7VuHWZLXbaQRDNRRXyrTICM+ uaDAAvRpIjdE/AwF8Ts+svy8Fc0gyYRy+IMlFUo+g25umku6i46lfDDTKvHViumqxy/C qdKArtNus/oO5F3nhLmOfltGiuy1ln14rim2YJZqPt77N24jPAXMWIFdtVC2HBfDTgvV ys3A== 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; bh=XSyeuEWToydbXAkDNw69/d3BXoQq0N+79c7KNTuacL8=; b=dT7lTDKg5wvHOZD+XuojeBg8wOJ4zxaK5Wit0Ep+GWDrokJjGsjghmm+0NRZzEDhrc szbwar4f6pz7WJcnJkh2M7Ajf2q6xUxEd+49wgy0vnhP/fKcx6YEOhk88l0ckOBpolCy ZGkZywrLVFRpE4qQ/xUrzxXzMdwAM4gGAa38WxDXPxdoTt+8ofwm5/bb5WncE55LKrrt GllBTNH3koIvxkZ8ovCiztm649XbF/a1rGwV9q6mBnPusa7O4zb65XteVRTKMp5OSyuh KKymA6NMVu+0domWMy8Pv0mJ/vP9NspNCz6i4/DGw5qJwCmZi9IQqHgSkaGUJPu6GT3v qLiQ== X-Gm-Message-State: AMCzsaWcSI6OWBHydtFjPKVYGuHqEdI4CYQ6ADlIoBDV0hQ1LqD42L8+ YA12qALulil2XQzQ/tLxmU4= X-Google-Smtp-Source: ABhQp+TsaO5IAaibhTRgACiJ2xOj5KbFk8QJNPI6Mzy9tYjKvKQS2pN7oLHrxUZPFEbtmo+dhWAe5g== X-Received: by 10.28.14.138 with SMTP id 132mr1690703wmo.7.1507812648100; Thu, 12 Oct 2017 05:50:48 -0700 (PDT) Received: from gmail.com (dell-goyal.wifi.rsr.lip6.fr. [132.227.77.190]) by smtp.gmail.com with ESMTPSA id u68sm155247wmu.47.2017.10.12.05.50.46 (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 12 Oct 2017 05:50:47 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Thu, 12 Oct 2017 14:50:46 +0200 From: Bhumika Goyal To: julia.lawall@lip6.fr, kishon@ti.com, bhelgaas@google.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Bhumika Goyal Subject: [PATCH] PCI: endpoint: make config_item_type const Date: Thu, 12 Oct 2017 14:50:23 +0200 Message-Id: <1507812623-12598-1-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org This is a followup patch for: https://patchwork.kernel.org/patch/9999649/ and https://lkml.org/lkml/2017/10/11/375 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 --- drivers/pci/endpoint/pci-ep-cfs.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/pci/endpoint/pci-ep-cfs.c b/drivers/pci/endpoint/pci-ep-cfs.c index 424fdd6..4f74386 100644 --- a/drivers/pci/endpoint/pci-ep-cfs.c +++ b/drivers/pci/endpoint/pci-ep-cfs.c @@ -150,7 +150,7 @@ static void pci_epc_epf_unlink(struct config_item *epc_item, .drop_link = pci_epc_epf_unlink, }; -static struct config_item_type pci_epc_type = { +static const struct config_item_type pci_epc_type = { .ct_item_ops = &pci_epc_item_ops, .ct_attrs = pci_epc_attrs, .ct_owner = THIS_MODULE, @@ -361,7 +361,7 @@ static void pci_epf_release(struct config_item *item) .release = pci_epf_release, }; -static struct config_item_type pci_epf_type = { +static const struct config_item_type pci_epf_type = { .ct_item_ops = &pci_epf_ops, .ct_attrs = pci_epf_attrs, .ct_owner = THIS_MODULE, @@ -400,7 +400,7 @@ static void pci_epf_drop(struct config_group *group, struct config_item *item) .drop_item = &pci_epf_drop, }; -static struct config_item_type pci_epf_group_type = { +static const struct config_item_type pci_epf_group_type = { .ct_group_ops = &pci_epf_group_ops, .ct_owner = THIS_MODULE, }; @@ -428,15 +428,15 @@ void pci_ep_cfs_remove_epf_group(struct config_group *group) } EXPORT_SYMBOL(pci_ep_cfs_remove_epf_group); -static struct config_item_type pci_functions_type = { +static const struct config_item_type pci_functions_type = { .ct_owner = THIS_MODULE, }; -static struct config_item_type pci_controllers_type = { +static const struct config_item_type pci_controllers_type = { .ct_owner = THIS_MODULE, }; -static struct config_item_type pci_ep_type = { +static const struct config_item_type pci_ep_type = { .ct_owner = THIS_MODULE, };