diff options
author | Elyes Haouas <ehaouas@noos.fr> | 2024-10-28 08:18:59 +0100 |
---|---|---|
committer | Elyes Haouas <ehaouas@noos.fr> | 2024-10-29 01:41:41 +0000 |
commit | 686b36bab86f49a796f07aaa9d73a9305461969a (patch) | |
tree | f7d14b72f9cd684bb7c713a8050424e7f9c09229 /src/soc | |
parent | 9dc9ef3082714b98ed14f37d6e82f96b02ef5946 (diff) |
tree: Fix cast an object of type 'nullptr_t' to 'uintptr_t' error
This to fix the error when using C23:
cannot cast an object of type 'nullptr_t' to 'uintptr_t' (aka 'unsigned long')
return (uintptr_t)NULL;
^
Change-Id: Ibdc8794513a508fc61a5046692f854183c36b781
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84893
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jakub Czapiga <czapiga@google.com>
Diffstat (limited to 'src/soc')
-rw-r--r-- | src/soc/intel/apollolake/romstage.c | 2 | ||||
-rw-r--r-- | src/soc/intel/common/block/i2c/i2c.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/soc/intel/apollolake/romstage.c b/src/soc/intel/apollolake/romstage.c index d8d11a0402..2ddb07e6d6 100644 --- a/src/soc/intel/apollolake/romstage.c +++ b/src/soc/intel/apollolake/romstage.c @@ -293,7 +293,7 @@ void platform_fsp_memory_init_params_cb(FSPM_UPD *mupd, uint32_t version) parse_devicetree_setting(mupd); /* Do NOT let FSP do any GPIO pad configuration */ - mupd->FspmConfig.PreMemGpioTablePtr = (uintptr_t)NULL; + mupd->FspmConfig.PreMemGpioTablePtr = 0; mupd->FspmConfig.SkipCseRbp = CONFIG(SKIP_CSE_RBP); diff --git a/src/soc/intel/common/block/i2c/i2c.c b/src/soc/intel/common/block/i2c/i2c.c index 679d425a90..3c2f211d28 100644 --- a/src/soc/intel/common/block/i2c/i2c.c +++ b/src/soc/intel/common/block/i2c/i2c.c @@ -88,7 +88,7 @@ uintptr_t dw_i2c_base_address(unsigned int bus) /* Find device+function for this controller */ devfn = dw_i2c_soc_bus_to_devfn(bus); if (devfn < 0) - return (uintptr_t)NULL; + return 0; /* Form a PCI address for this device */ dev = PCI_DEV(0, PCI_SLOT(devfn), PCI_FUNC(devfn)); @@ -114,12 +114,12 @@ uintptr_t dw_i2c_base_address(unsigned int bus) devfn = dw_i2c_soc_bus_to_devfn(bus); if (devfn < 0) - return (uintptr_t)NULL; + return 0; /* devfn -> dev */ dev = pcidev_path_on_root(devfn); if (!dev || !dev->enabled) - return (uintptr_t)NULL; + return 0; /* dev -> bar0 */ res = probe_resource(dev, PCI_BASE_ADDRESS_0); |