[PATCH linux-next] x86:irq_remapping: fix boolreturn.cocci warnings

From: CGEL
Date: Tue Aug 24 2021 - 03:02:52 EST


From: Jing Yangyang <jing.yangyang@xxxxxxxxxx>

./arch/x86/include/asm/irq_remapping.h:59:70-71:WARNING:return of 0/1
in function 'irq_remapping_cap' with return type bool

Return statements in functions returning bool should use true/false
instead of 1/0.

Generated by: scripts/coccinelle/misc/boolreturn.cocci

Reported-by: Zeal Robot <zealci@xxxxxxxxxx>
Signed-off-by: Jing Yangyang <jing.yangyang@xxxxxxxxxx>
---
arch/x86/include/asm/irq_remapping.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/irq_remapping.h b/arch/x86/include/asm/irq_remapping.h
index 7cc4943..2b0d2b7 100644
--- a/arch/x86/include/asm/irq_remapping.h
+++ b/arch/x86/include/asm/irq_remapping.h
@@ -56,7 +56,7 @@ static inline struct irq_domain *arch_get_ir_parent_domain(void)

#else /* CONFIG_IRQ_REMAP */

-static inline bool irq_remapping_cap(enum irq_remap_cap cap) { return 0; }
+static inline bool irq_remapping_cap(enum irq_remap_cap cap) { return false; }
static inline void set_irq_remapping_broken(void) { }
static inline int irq_remapping_prepare(void) { return -ENODEV; }
static inline int irq_remapping_enable(void) { return -ENODEV; }
--
1.8.3.1