From 5af6acab5ccd0fe2aa1686c502580e984887c62c Mon Sep 17 00:00:00 2001 From: Stewart Smith Date: Tue, 17 Nov 2015 15:46:17 +1100 Subject: PCI: use define for wanting dynamic PHB id for pci_register_phb No functional change, but static analysis showed up the oddity of something that is generally unsigned (opal_id) having a signed value assigned to it. Took the opportunity to use a define to increase readability. Signed-off-by: Stewart Smith --- hw/npu.c | 2 +- hw/p5ioc2-phb.c | 2 +- hw/p7ioc-phb.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'hw') diff --git a/hw/npu.c b/hw/npu.c index 3649728..f0be9fc 100644 --- a/hw/npu.c +++ b/hw/npu.c @@ -1692,7 +1692,7 @@ static void npu_create_phb(struct dt_node *dn) npu_add_phb_properties(p); /* Register PHB */ - pci_register_phb(&p->phb, -1); + pci_register_phb(&p->phb, OPAL_DYNAMIC_PHB_ID); /* Initialize IODA cache */ npu_ioda_init(p); diff --git a/hw/p5ioc2-phb.c b/hw/p5ioc2-phb.c index 1c9dbb6..70a1a09 100644 --- a/hw/p5ioc2-phb.c +++ b/hw/p5ioc2-phb.c @@ -1197,7 +1197,7 @@ void p5ioc2_phb_setup(struct p5ioc2 *ioc, struct p5ioc2_phb *p, /* We register the PHB before we initialize it so we * get a useful OPAL ID for it */ - pci_register_phb(&p->phb, -1); + pci_register_phb(&p->phb, OPAL_DYNAMIC_PHB_ID); /* Platform additional setup */ if (platform.pci_setup_phb) diff --git a/hw/p7ioc-phb.c b/hw/p7ioc-phb.c index 66c166f..97e4885 100644 --- a/hw/p7ioc-phb.c +++ b/hw/p7ioc-phb.c @@ -2929,7 +2929,7 @@ void p7ioc_phb_setup(struct p7ioc *ioc, uint8_t index) /* We register the PHB before we initialize it so we * get a useful OPAL ID for it */ - pci_register_phb(&p->phb, -1); + pci_register_phb(&p->phb, OPAL_DYNAMIC_PHB_ID); /* Platform additional setup */ if (platform.pci_setup_phb) -- cgit v1.1