summaryrefslogtreecommitdiff
path: root/src/northbridge/intel
diff options
context:
space:
mode:
authorElyes Haouas <ehaouas@noos.fr>2024-08-10 09:52:57 +0200
committerMartin L Roth <gaumless@gmail.com>2024-10-14 15:31:08 +0000
commitbede28b17df3aa3af4adc9c2396abd4070785cda (patch)
treef1e5423adfb91dfcb3be810902ad8896757c7fb7 /src/northbridge/intel
parent55a5041fbfcda747db6b24c4c6a292ecb26cac50 (diff)
i945: Use nullptr instead of NULL
nullptr was introduced in C11 spec and gcc 4.7. https://en.cppreference.com/w/cpp/language/nullptr https://stackoverflow.com/questions/16256586/how-to-enable-c11-on-later-versions-of-gcc coreboot switched to GCC 4.7.2 on October 25, 2021, prior to coreboot v4.1. https://review.coreboot.org/c/coreboot/+/1609 GCC-13 implemented nullptr constant: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3042.htm So use it insted of NULL macro. Change-Id: I7d47e692a33d739345a81f589d4329a31beeb8c5 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83860 Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/northbridge/intel')
-rw-r--r--src/northbridge/intel/i945/northbridge.c4
-rw-r--r--src/northbridge/intel/i945/raminit.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/northbridge/intel/i945/northbridge.c b/src/northbridge/intel/i945/northbridge.c
index 82f3843d4f..a268c5b15a 100644
--- a/src/northbridge/intel/i945/northbridge.c
+++ b/src/northbridge/intel/i945/northbridge.c
@@ -74,14 +74,14 @@ static const char *northbridge_acpi_name(const struct device *dev)
return "PCI0";
if (!is_pci_dev_on_bus(dev, 0))
- return NULL;
+ return nullptr;
switch (dev->path.pci.devfn) {
case PCI_DEVFN(0, 0):
return "MCHC";
}
- return NULL;
+ return nullptr;
}
void northbridge_write_smram(u8 smram)
diff --git a/src/northbridge/intel/i945/raminit.c b/src/northbridge/intel/i945/raminit.c
index a37754b7f3..b664fbee08 100644
--- a/src/northbridge/intel/i945/raminit.c
+++ b/src/northbridge/intel/i945/raminit.c
@@ -1142,7 +1142,7 @@ static int sdram_program_row_boundaries(struct sys_info *sysinfo)
int i;
size_t cum0, cum1, tolud, tom, pci_mmio_size;
const struct device *dev;
- const struct northbridge_intel_i945_config *cfg = NULL;
+ const struct northbridge_intel_i945_config *cfg = nullptr;
printk(BIOS_DEBUG, "Setting RAM size...\n");