Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1703290

[PATCH 5/5] PCI: hotplug: cpqphp: constify pci_device_id.

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Arvind Yadav <arvind.yadav.cs@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 5/5] PCI: hotplug: cpqphp: constify pci_device_id.
Date Thu, 03 Aug 2017 19:20:02 +0200
Message-ID <uarWW-37e-9@gated-at.bofh.it> (permalink)
References <uarWW-37e-5@gated-at.bofh.it>
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=2Ijts6jPk7hsu7/QmS10bbT3Kf4pH2jFrFkyjtVcQmA=; b=k3WH44778GI3L9QoG4df5dcTyhIN6dVkbm3fjDgfPnwET+fCmY/WPAb5F9s8MweI9A HaePfGFvaMNmTR/ObNel1uJvPYmnM+BujnPp5ZwkpqZDWavQ0f4w7FHYPRAChsCHfG24 Num0KSmahBtaquEmCmZ7b3toIau/B89hyT6KTBVwL/yAf78WDHAglyw+a8VJduBorBBe 2pWg+SSmmjOKtCTuHZYbBeCMRoTKykFI8OEO7sqnDuOxArR4WRg2c8gcj7CKCueN04cc blHZnrzv9s5JLkCHjyrZOhXcek3LGWEwzjor2CQ4Wbha1yFwyetXCTPH2Ermn9Ui1pBu is9A==
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=2Ijts6jPk7hsu7/QmS10bbT3Kf4pH2jFrFkyjtVcQmA=; b=FIGsI4y03xP5K0R0RZRy0QOd3i57q5h3NxpONEWnLKLZ95NDpBduOA9ciB8S8T5iLD Efy5UEFJIAu1kANJxNN4aGz7b7ekmGTsPx9WDXk1BxHHydkDxpXgMRNMK1oKmW5nGNXS /lbYmu+u5sZy9DTsxDTyip0dHx/k9vAgaslS+Csf7eMV27oQdD4CxlfzPS7bmA1d6Gbh ZZTeYhZNnX4XOG2juJHYHJ8FOisWfV9UBHTY1yt5XcJU39CrfUIayds/F8OYuNNsJRkx i3CPdXVySpGssflYkCHk5j2Gonf/xiPWxvnHQIelt0bid+xsgZj8e4RpzvOuaE7MqeLw XKwg==
X-Gm-Message-State AIVw111jNYHK/tsDGRJ4kiNqesEK1ZX3f05fYdOwE0iMXGqk0EYMO6vg DaMBOBsONvFcyQ==
X-Received by 10.98.130.206 with SMTP id w197mr2279614pfd.310.1501780213796; Thu, 03 Aug 2017 10:10:13 -0700 (PDT)
X-Mailer git-send-email 2.7.4
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 24
Organization linux.* mail to news gateway
X-Original-Cc linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org
X-Original-Date Thu, 3 Aug 2017 22:39:16 +0530
X-Original-Message-ID <1501780156-24708-6-git-send-email-arvind.yadav.cs@gmail.com>
X-Original-References <1501780156-24708-1-git-send-email-arvind.yadav.cs@gmail.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1703290

Show key headers only | View raw


pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <linux/pci.h> work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/pci/hotplug/cpqphp_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/hotplug/cpqphp_core.c b/drivers/pci/hotplug/cpqphp_core.c
index 33d300d..4d06b84 100644
--- a/drivers/pci/hotplug/cpqphp_core.c
+++ b/drivers/pci/hotplug/cpqphp_core.c
@@ -1417,7 +1417,7 @@ static void __exit unload_cpqphpd(void)
 		iounmap(smbios_start);
 }
 
-static struct pci_device_id hpcd_pci_tbl[] = {
+static const struct pci_device_id hpcd_pci_tbl[] = {
 	{
 	/* handle any PCI Hotplug controller */
 	.class =        ((PCI_CLASS_SYSTEM_PCI_HOTPLUG << 8) | 0x00),
-- 
2.7.4

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 5/5] PCI: hotplug: cpqphp: constify pci_device_id. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-03 19:20 +0200

csiph-web