Attention is currently required from: Elyes Haouas.
Angel Pons has posted comments on this change by Elyes Haouas. ( https://review.coreboot.org/c/coreboot/+/82658?usp=email )
Change subject: tree: Use Wcalloc-transposed-args command option ......................................................................
Patch Set 3:
(1 comment)
File src/southbridge/intel/common/rcba_pirq.c:
https://review.coreboot.org/c/coreboot/+/82658/comment/99a4e8c8_07951457?usp... : PS3, Line 61: pin_irq_map = calloc(MAX_SLOTS, sizeof(struct slot_pin_irq_map) * PCI_INT_MAX); This is still nosense. The function is `void *calloc(size_t num, size_t size)`. The structure is:
``` struct slot_pin_irq_map { unsigned int slot; enum pci_pin pin; /* PIRQ # for PIC mode */ unsigned int pic_pirq; /* GSI # for APIC mode */ unsigned int apic_gsi; }; ```
The variable is declared as follows: ``` struct slot_pin_irq_map *pin_irq_map; ```
So I would say the most semantically correct form would be:
``` pin_irq_map = calloc(MAX_SLOTS * PCI_INT_MAX, sizeof(struct slot_pin_irq_map));```