From d86c5bf83b66565c437b0c3f399c61305c33d870 Mon Sep 17 00:00:00 2001 From: Yidi Lin Date: Wed, 28 Aug 2024 16:35:23 +0800 Subject: soc/mediatek/common/pcie: Add DEVTREE_CONST qualifier Currently pcie.c is built into ramstage only, where DEVTREE_CONST is an empty macro, so there's no problem with that. However, if we would like to include that file in pre-ramstage, then DEVTREE_CONST would be 'const', leading to the following build error: ``` src/soc/mediatek/common/pcie.c:104:26: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] 104 | root_dev = pcidev_path_on_root(devfn); | ^ ``` BUG=none TEST=emerge-cherry coreboot Change-Id: Ia7c95424019ec0dca50bbc6be7f81b6180d06d6e Signed-off-by: Yidi Lin Reviewed-on: https://review.coreboot.org/c/coreboot/+/84113 Reviewed-by: Jianjun Wang Tested-by: build bot (Jenkins) Reviewed-by: Yu-Ping Wu --- src/soc/mediatek/common/pcie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/soc/mediatek') diff --git a/src/soc/mediatek/common/pcie.c b/src/soc/mediatek/common/pcie.c index ce9055a8bc..c07cc4f748 100644 --- a/src/soc/mediatek/common/pcie.c +++ b/src/soc/mediatek/common/pcie.c @@ -96,7 +96,7 @@ static const char *const ltssm_str[] = { static uintptr_t mtk_pcie_get_controller_base(pci_devfn_t devfn) { - struct device *root_dev; + DEVTREE_CONST struct device *root_dev; const mtk_soc_config_t *config; static uintptr_t base = 0; -- cgit v1.2.3