Skip to contentSkip to conversation

genirq: fix comment to __handle_domain_irq

PATCH In review Vladimir Murzin 2 participants 2 messages Jan 10, 2017 – Feb 10, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 genirq: fix comment to __handle_domain_irq

NULL domain is valid parameter and handled as default irq domain by irq_find_mapping(). Instead of using NULL domain, dedicated "lookup" parameter should be used to indicate whether conversion of HW interrupt to the logical one is needed or not.

Cc Thomas Gleixner <[email protected]>
Cc Marc Zyngier <[email protected]>
---
 include/linux/irqdesc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/irqdesc.h +1 -1
index c9be579..8f5f7d9 100644
@@ -156,7 +156,7 @@ static inline void generic_handle_irq_desc(struct irq_desc *desc)
 /*
  * Convert a HW interrupt number to a logical one using a IRQ domain,
  * and handle the result interrupt number. Return -EINVAL if
- * conversion failed. Providing a NULL domain indicates that the
+ * conversion failed. Providing lookup set to false indicates that the
  * conversion has already been done.
  */
 int __handle_domain_irq(struct irq_domain *domain, unsigned int hwirq,
Signature · 1 line
1.9.1
#1 lore raw
Quoted 17 lines · Vladimir Murzin

NULL domain is valid parameter and handled as default irq domain by irq_find_mapping(). Instead of using NULL domain, dedicated "lookup" parameter should be used to indicate whether conversion of HW interrupt to the logical one is needed or not.

Cc Thomas Gleixner <[email protected]>
Cc Marc Zyngier <[email protected]>
---
 include/linux/irqdesc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/irqdesc.h +0 -0
index c9be579..8f5f7d9 100644

include/linux/irqdesc.h static inline void generic_handle_irq_desc(struct irq_desc *desc) · line 161

Quoted 7 lines
include/linux/irqdesc.h +1 -1
@@ -156,7 +156,7 @@ static inline void generic_handle_irq_desc(struct irq_desc *desc)
 /*
  * Convert a HW interrupt number to a logical one using a IRQ domain,
  * and handle the result interrupt number. Return -EINVAL if
- * conversion failed. Providing a NULL domain indicates that the
+ * conversion failed. Providing lookup set to false indicates that the
  * conversion has already been done.
  */

We should just remove that comment completely as we have a proper and correct kernel doc annotation for that function where its implemented. Having two places to document stuff is just wrong.

Thanks,

tglx