Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

irqdomain: Change the type of 'size' in __irq_domain_add() to be consistent

The 'size' is used in struct_size(domain, revmap, size) and its input
parameter type is 'size_t'(unsigned int).
Changing the size to 'unsigned int' to make the type consistent.

Signed-off-by: Bixuan Cui <cuibixuan@huawei.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210916025203.44841-1-cuibixuan@huawei.com

authored by

Bixuan Cui and committed by
Marc Zyngier
20c36ce2 2a7313dc

+2 -2
+1 -1
include/linux/irqdomain.h
··· 251 251 } 252 252 253 253 void irq_domain_free_fwnode(struct fwnode_handle *fwnode); 254 - struct irq_domain *__irq_domain_add(struct fwnode_handle *fwnode, int size, 254 + struct irq_domain *__irq_domain_add(struct fwnode_handle *fwnode, unsigned int size, 255 255 irq_hw_number_t hwirq_max, int direct_max, 256 256 const struct irq_domain_ops *ops, 257 257 void *host_data);
+1 -1
kernel/irq/irqdomain.c
··· 136 136 * Allocates and initializes an irq_domain structure. 137 137 * Returns pointer to IRQ domain, or NULL on failure. 138 138 */ 139 - struct irq_domain *__irq_domain_add(struct fwnode_handle *fwnode, int size, 139 + struct irq_domain *__irq_domain_add(struct fwnode_handle *fwnode, unsigned int size, 140 140 irq_hw_number_t hwirq_max, int direct_max, 141 141 const struct irq_domain_ops *ops, 142 142 void *host_data)