Patrick Georgi submitted this change.

View Change

Approvals: build bot (Jenkins): Verified Nico Huber: Looks good to me, approved Angel Pons: Looks good to me, approved Karthik Ramasubramanian: Looks good to me, approved
util/sconfig: Change __pci*|__pnp* device pointers to const

This change updates the device pointers exposed in static_devices.h to
const instead of DEVTREE_CONST. The pointer itself doesn't really need
to be DEVTREE_CONST.

Change-Id: I061b05d994fc5c4156ee8bddabadf940f0aeeac3
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/49242
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
---
M util/sconfig/main.c
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/util/sconfig/main.c b/util/sconfig/main.c
index 175b926..1af55ac 100644
--- a/util/sconfig/main.c
+++ b/util/sconfig/main.c
@@ -1211,16 +1211,16 @@
{
/* Only devices on root bus here. */
if (ptr->bustype == PCI && ptr->parent->dev->bustype == DOMAIN) {
- fprintf(head, "extern DEVTREE_CONST struct device *DEVTREE_CONST __pci_0_%02x_%d;\n",
+ fprintf(head, "extern DEVTREE_CONST struct device *const __pci_0_%02x_%d;\n",
ptr->path_a, ptr->path_b);
- fprintf(fil, "DEVTREE_CONST struct device *DEVTREE_CONST __pci_0_%02x_%d = &%s;\n",
+ fprintf(fil, "DEVTREE_CONST struct device *const __pci_0_%02x_%d = &%s;\n",
ptr->path_a, ptr->path_b, ptr->name);
}

if (ptr->bustype == PNP) {
- fprintf(head, "extern DEVTREE_CONST struct device *DEVTREE_CONST __pnp_%04x_%02x;\n",
+ fprintf(head, "extern DEVTREE_CONST struct device *const __pnp_%04x_%02x;\n",
ptr->path_a, ptr->path_b);
- fprintf(fil, "DEVTREE_CONST struct device *DEVTREE_CONST __pnp_%04x_%02x = &%s;\n",
+ fprintf(fil, "DEVTREE_CONST struct device *const __pnp_%04x_%02x = &%s;\n",
ptr->path_a, ptr->path_b, ptr->name);
}
}

To view, visit change 49242. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I061b05d994fc5c4156ee8bddabadf940f0aeeac3
Gerrit-Change-Number: 49242
Gerrit-PatchSet: 2
Gerrit-Owner: Furquan Shaikh <furquan@google.com>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Karthik Ramasubramanian <kramasub@google.com>
Gerrit-Reviewer: Martin Roth <martinroth@google.com>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: merged