Re: [PATCH -next] genirq: Change irq_can_set_affinity() return value type to bool

From: zhangjianhua (E)
Date: Tue Aug 23 2022 - 22:11:47 EST


kindly ping

在 2022/8/9 20:40, Zhang Jianhua 写道:
The function irq_can_set_affinity() return from __irq_can_set_affinity()
directly, whose return value type is bool, so make irq_can_set_affinity()
return bool too.

Signed-off-by: Zhang Jianhua <chris.zjh@xxxxxxxxxx>
---
include/linux/interrupt.h | 2 +-
kernel/irq/manage.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index a92bce40b04b..29de49af6dea 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -308,7 +308,7 @@ extern cpumask_var_t irq_default_affinity;
extern int irq_set_affinity(unsigned int irq, const struct cpumask *cpumask);
extern int irq_force_affinity(unsigned int irq, const struct cpumask *cpumask);
-extern int irq_can_set_affinity(unsigned int irq);
+extern bool irq_can_set_affinity(unsigned int irq);
extern int irq_select_affinity(unsigned int irq);
extern int __irq_apply_affinity_hint(unsigned int irq, const struct cpumask *m,
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 40fe7806cc8c..dd9aeef68834 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -156,7 +156,7 @@ static bool __irq_can_set_affinity(struct irq_desc *desc)
* @irq: Interrupt to check
*
*/
-int irq_can_set_affinity(unsigned int irq)
+bool irq_can_set_affinity(unsigned int irq)
{
return __irq_can_set_affinity(irq_to_desc(irq));
}