From patchwork Tue Sep 12 11:13:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 9949011 X-Patchwork-Delegate: bhelgaas@google.com 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 0BE376038F for ; Tue, 12 Sep 2017 11:13:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F33C928F0B for ; Tue, 12 Sep 2017 11:13:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E7C0D28F1A; Tue, 12 Sep 2017 11:13:47 +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 9190528F0B for ; Tue, 12 Sep 2017 11:13:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751311AbdILLNq (ORCPT ); Tue, 12 Sep 2017 07:13:46 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:36157 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751289AbdILLNp (ORCPT ); Tue, 12 Sep 2017 07:13:45 -0400 Received: by mail-pf0-f193.google.com with SMTP id f84so6117724pfj.3; Tue, 12 Sep 2017 04:13: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; bh=u4bamFXcHC5vO0jrdUH8hz8dbV4LuRUYWM4FoJZkeZk=; b=pfduj1LepTyHRSDX18gxphfWck7Mwufmg+V0pkKXg4eWrSGQqGn+8XOKIN1brgjnT6 hFMUNVvVw6IlPNS2qT+ETGg94qmdyrmuMrDpXcaoCY0gRe5ZcMPSGYIjUV3Inh+Jl8Zn yoDbO3IhYF4rhi3YzgEioYQClo8YWZ159prOKhSUpHh7gYZUDFe6phJbt/A4Y6jtXvRH bOWK6EC4wQRRzfCWFQIAXAfDzIkzNoTp6NSYojihUDso12KaOUpD9MX824hbv1uiR6H6 aKe7kiZdTY8hlYQz3Px8DHr+1gKHgwDFa6xG0IqG9WH/FkwHjCLfU/AUCCB8AyJd2e8g EILQ== 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=u4bamFXcHC5vO0jrdUH8hz8dbV4LuRUYWM4FoJZkeZk=; b=eAZMlwYqpWe+ZDGfopl3bzA29asMOlvJXw4cMfxzGyiRqGmUcCGbh8qKyHD7gAwSk6 aeHrjDZaleKQQNkMaj8ijne5gReU+iv49AbcTEu4pajCI8DWM/Rrb4/s2+ZfVmVFxSlZ kw3haH7r+rSF6yWIseaN0ttcqyQq7EHwLbHAmxVDKnMrajFcsKgrewuZVC2CAjGxRIQV K2H6ftgrImDZJOEbEDRWYMB6WxVqU94PxnFavDFAuAFPGf9rcTcjHGYK55m1F+YvqUvq 3p/DNcblRoZuzdRB4XNXeylsGXoFMuYP/7egJeB7g6BLiK3aJu5PuvAJPmZVtK6Aqbxp DvGA== X-Gm-Message-State: AHPjjUjdN+JrQhO/GcolCEwTGN/HiCU2+4p7EQErwKkDdWksy+G7/enw UJ0/yS3F0G3QtQ== X-Google-Smtp-Source: ADKCNb6acN7NQebpscAFm5dQebXwTlOVcARZaCrTzN16N4BXJF4hh+N2RKRPusssjvPF/uEDsW2wLg== X-Received: by 10.84.174.197 with SMTP id r63mr16426214plb.235.1505214824962; Tue, 12 Sep 2017 04:13:44 -0700 (PDT) Received: from gmail.com ([117.196.125.159]) by smtp.gmail.com with ESMTPSA id c7sm9739991pfg.85.2017.09.12.04.13.41 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 12 Sep 2017 04:13:44 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Tue, 12 Sep 2017 16:43:38 +0530 From: Bhumika Goyal To: julia.lawall@lip6.fr, bhelgaas@google.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Bhumika Goyal Subject: [PATCH] PCI: make pci_dev_type const Date: Tue, 12 Sep 2017 16:43:33 +0530 Message-Id: <1505214813-9591-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 X-Virus-Scanned: ClamAV using ClamSMTP Make this const as it not modified in the file referencing it. It is only stored in a const field 'type' of a device structure. Also, add const to the variable declaration in the header file. Signed-off-by: Bhumika Goyal --- drivers/pci/pci-sysfs.c | 2 +- drivers/pci/pci.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 1eecfa3..882d6c3 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c @@ -1788,6 +1788,6 @@ static umode_t sriov_attrs_are_visible(struct kobject *kobj, NULL, }; -struct device_type pci_dev_type = { +const struct device_type pci_dev_type = { .groups = pci_dev_attr_groups, }; diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index a6560c9..1db36f2 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -192,7 +192,7 @@ static inline int pci_no_d1d2(struct pci_dev *dev) } extern const struct attribute_group *pci_dev_groups[]; extern const struct attribute_group *pcibus_groups[]; -extern struct device_type pci_dev_type; +extern const struct device_type pci_dev_type; extern const struct attribute_group *pci_bus_groups[];