From aa8386929e8e01638c82ec730cb62a15b5a7ec3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Cab=C3=A9?= Date: Mon, 9 Jun 2025 11:52:39 +0200 Subject: [PATCH] drivers: intc_wch_pfic: replace shift operations with BIT macro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated intc_wch_pfic driver to use BIT() macro for clarity. Signed-off-by: Benjamin Cabé --- drivers/interrupt_controller/intc_wch_pfic.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/interrupt_controller/intc_wch_pfic.c b/drivers/interrupt_controller/intc_wch_pfic.c index fa07f6cbcd7..2d91ca29b9b 100644 --- a/drivers/interrupt_controller/intc_wch_pfic.c +++ b/drivers/interrupt_controller/intc_wch_pfic.c @@ -12,23 +12,24 @@ #include #include #include +#include -#define SEVONPEND (1 << 4) -#define WFITOWFE (1 << 3) +#define SEVONPEND BIT(4) +#define WFITOWFE BIT(3) void arch_irq_enable(unsigned int irq) { - PFIC->IENR[irq / 32] = 1 << (irq % 32); + PFIC->IENR[irq / 32] = BIT(irq % 32); } void arch_irq_disable(unsigned int irq) { - PFIC->IRER[irq / 32] = 1 << (irq % 32); + PFIC->IRER[irq / 32] = BIT(irq % 32); } int arch_irq_is_enabled(unsigned int irq) { - return ((PFIC->ISR[irq >> 5] & (1 << (irq & 0x1F))) != 0); + return ((PFIC->ISR[irq >> 5] & BIT(irq & 0x1F)) != 0); } static int pfic_init(void)