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

Configure Feed

Select the types of activity you want to include in your feed.

irqdomain: Make irq_domain_create_hierarchy() an inline

There is no reason to export the function as an extra symbol. It is
simple enough and is just a wrapper to already exported functions.

Therefore, switch the exported function to an inline.

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250319092951.37667-13-jirislaby@kernel.org


authored by

Jiri Slaby (SUSE) and committed by
Thomas Gleixner
c7131b12 e847a847

+39 -47
+39 -6
include/linux/irqdomain.h
··· 591 591 void *handler_data, const char *handler_name); 592 592 void irq_domain_reset_irq_data(struct irq_data *irq_data); 593 593 #ifdef CONFIG_IRQ_DOMAIN_HIERARCHY 594 - struct irq_domain *irq_domain_create_hierarchy(struct irq_domain *parent, 595 - unsigned int flags, 596 - unsigned int size, 597 - struct fwnode_handle *fwnode, 598 - const struct irq_domain_ops *ops, 599 - void *host_data); 594 + /** 595 + * irq_domain_create_hierarchy - Add a irqdomain into the hierarchy 596 + * @parent: Parent irq domain to associate with the new domain 597 + * @flags: Irq domain flags associated to the domain 598 + * @size: Size of the domain. See below 599 + * @fwnode: Optional fwnode of the interrupt controller 600 + * @ops: Pointer to the interrupt domain callbacks 601 + * @host_data: Controller private data pointer 602 + * 603 + * If @size is 0 a tree domain is created, otherwise a linear domain. 604 + * 605 + * If successful the parent is associated to the new domain and the 606 + * domain flags are set. 607 + * Returns pointer to IRQ domain, or NULL on failure. 608 + */ 609 + static inline struct irq_domain *irq_domain_create_hierarchy(struct irq_domain *parent, 610 + unsigned int flags, 611 + unsigned int size, 612 + struct fwnode_handle *fwnode, 613 + const struct irq_domain_ops *ops, 614 + void *host_data) 615 + { 616 + struct irq_domain_info info = { 617 + .fwnode = fwnode, 618 + .size = size, 619 + .hwirq_max = size, 620 + .ops = ops, 621 + .host_data = host_data, 622 + .domain_flags = flags, 623 + .parent = parent, 624 + }; 625 + struct irq_domain *d; 626 + 627 + if (!info.size) 628 + info.hwirq_max = ~0U; 629 + 630 + d = irq_domain_instantiate(&info); 631 + return IS_ERR(d) ? NULL : d; 632 + } 600 633 601 634 static inline struct irq_domain *irq_domain_add_hierarchy(struct irq_domain *parent, 602 635 unsigned int flags,
-41
kernel/irq/irqdomain.c
··· 1308 1308 EXPORT_SYMBOL_GPL(irq_domain_reset_irq_data); 1309 1309 1310 1310 #ifdef CONFIG_IRQ_DOMAIN_HIERARCHY 1311 - /** 1312 - * irq_domain_create_hierarchy - Add a irqdomain into the hierarchy 1313 - * @parent: Parent irq domain to associate with the new domain 1314 - * @flags: Irq domain flags associated to the domain 1315 - * @size: Size of the domain. See below 1316 - * @fwnode: Optional fwnode of the interrupt controller 1317 - * @ops: Pointer to the interrupt domain callbacks 1318 - * @host_data: Controller private data pointer 1319 - * 1320 - * If @size is 0 a tree domain is created, otherwise a linear domain. 1321 - * 1322 - * If successful the parent is associated to the new domain and the 1323 - * domain flags are set. 1324 - * Returns pointer to IRQ domain, or NULL on failure. 1325 - */ 1326 - struct irq_domain *irq_domain_create_hierarchy(struct irq_domain *parent, 1327 - unsigned int flags, 1328 - unsigned int size, 1329 - struct fwnode_handle *fwnode, 1330 - const struct irq_domain_ops *ops, 1331 - void *host_data) 1332 - { 1333 - struct irq_domain_info info = { 1334 - .fwnode = fwnode, 1335 - .size = size, 1336 - .hwirq_max = size, 1337 - .ops = ops, 1338 - .host_data = host_data, 1339 - .domain_flags = flags, 1340 - .parent = parent, 1341 - }; 1342 - struct irq_domain *d; 1343 - 1344 - if (!info.size) 1345 - info.hwirq_max = ~0U; 1346 - 1347 - d = irq_domain_instantiate(&info); 1348 - return IS_ERR(d) ? NULL : d; 1349 - } 1350 - EXPORT_SYMBOL_GPL(irq_domain_create_hierarchy); 1351 - 1352 1311 static void irq_domain_insert_irq(int virq) 1353 1312 { 1354 1313 struct irq_data *data;