From b3db3abd6311924930f3250c9f9fc3157fbbf7da Mon Sep 17 00:00:00 2001 From: Elyes Haouas Date: Tue, 28 May 2024 06:07:27 +0200 Subject: tree: Use Wcalloc-transposed-args command option GCC-14 documentation says "The first argument to calloc is documented to be number of elements in array, while the second argument is size of each element, so calloc(n, sizeof (int)) is preferred over calloc(sizeof(int), n)." Change-Id: I77b6f4d2eda487b087ba5665b588999633c33e8d Signed-off-by: Elyes Haouas Reviewed-on: https://review.coreboot.org/c/coreboot/+/82658 Reviewed-by: Felix Singer Tested-by: build bot (Jenkins) --- src/southbridge/intel/common/rcba_pirq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/southbridge/intel/common/rcba_pirq.c b/src/southbridge/intel/common/rcba_pirq.c index c9f1518734..ce44bc46e3 100644 --- a/src/southbridge/intel/common/rcba_pirq.c +++ b/src/southbridge/intel/common/rcba_pirq.c @@ -58,7 +58,7 @@ void intel_acpi_gen_def_acpi_pirq(const struct device *lpc) printk(BIOS_DEBUG, "Generating ACPI PIRQ entries\n"); - pin_irq_map = calloc(sizeof(struct slot_pin_irq_map), MAX_SLOTS * PCI_INT_MAX); + pin_irq_map = calloc(MAX_SLOTS * PCI_INT_MAX, sizeof(struct slot_pin_irq_map)); pirq_map.type = PIRQ_SOURCE_PATH; for (i = 0; i < PIRQ_COUNT; i++) snprintf(pirq_map.source_path[i], sizeof(pirq_map.source_path[i]), -- cgit v1.2.3