From 178a5054b34092bb8380e25368d8dc8493a2f5ed Mon Sep 17 00:00:00 2001 From: Elyes Haouas Date: Mon, 3 Jun 2024 17:00:56 +0200 Subject: tree: Use calloc(n, sizeof(struct)) insteadof calloc(sizeof(struct), n) Change-Id: I5e67e370d4eb8fe28227843bbca34db06ad84b26 Signed-off-by: Elyes Haouas Reviewed-on: https://review.coreboot.org/c/coreboot/+/82786 Reviewed-by: Nico Huber Tested-by: build bot (Jenkins) --- src/soc/intel/common/block/irq/irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/soc') diff --git a/src/soc/intel/common/block/irq/irq.c b/src/soc/intel/common/block/irq/irq.c index 4ffe138798..386538e61b 100644 --- a/src/soc/intel/common/block/irq/irq.c +++ b/src/soc/intel/common/block/irq/irq.c @@ -373,7 +373,7 @@ bool generate_pin_irq_map(void) if (!cached_entries) return false; - pin_irq_map = calloc(MAX_SLOTS, sizeof(struct slot_pin_irq_map) * PCI_INT_MAX); + pin_irq_map = calloc(MAX_SLOTS * PCI_INT_MAX, sizeof(struct slot_pin_irq_map)); pirq_map.type = PIRQ_GSI; legacy_pirq_routing = lpc_get_pic_pirq_routing(&pirq_routes); -- cgit v1.2.3