[patch 1/4] genirq: Remove pointless local variable

Thomas Gleixner posted 4 patches 2 months, 2 weeks ago
[patch 1/4] genirq: Remove pointless local variable
Posted by Thomas Gleixner 2 months, 2 weeks ago
The variable is only used at one place, which can simply take the constant
as function argument.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 kernel/irq/chip.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -458,13 +458,11 @@ static bool irq_check_poll(struct irq_de
 
 static bool irq_can_handle_pm(struct irq_desc *desc)
 {
-	unsigned int mask = IRQD_IRQ_INPROGRESS | IRQD_WAKEUP_ARMED;
-
 	/*
 	 * If the interrupt is not in progress and is not an armed
 	 * wakeup interrupt, proceed.
 	 */
-	if (!irqd_has_set(&desc->irq_data, mask))
+	if (!irqd_has_set(&desc->irq_data, IRQD_IRQ_INPROGRESS | IRQD_WAKEUP_ARMED))
 		return true;
 
 	/*
[tip: irq/core] genirq: Remove pointless local variable
Posted by tip-bot2 for Thomas Gleixner 2 months, 2 weeks ago
The following commit has been merged into the irq/core branch of tip:

Commit-ID:     46958a7bac2d32fda43fd7cd1858aa414640fbd1
Gitweb:        https://git.kernel.org/tip/46958a7bac2d32fda43fd7cd1858aa414640fbd1
Author:        Thomas Gleixner <tglx@linutronix.de>
AuthorDate:    Fri, 18 Jul 2025 20:54:06 +02:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Tue, 22 Jul 2025 14:30:42 +02:00

genirq: Remove pointless local variable

The variable is only used at one place, which can simply take the constant
as function argument.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Liangyan <liangyan.peng@bytedance.com>
Link: https://lore.kernel.org/all/20250718185311.884314473@linutronix.de

---
 kernel/irq/chip.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index 2b27400..5bb26fc 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -466,13 +466,11 @@ static bool irq_check_poll(struct irq_desc *desc)
 
 static bool irq_can_handle_pm(struct irq_desc *desc)
 {
-	unsigned int mask = IRQD_IRQ_INPROGRESS | IRQD_WAKEUP_ARMED;
-
 	/*
 	 * If the interrupt is not in progress and is not an armed
 	 * wakeup interrupt, proceed.
 	 */
-	if (!irqd_has_set(&desc->irq_data, mask))
+	if (!irqd_has_set(&desc->irq_data, IRQD_IRQ_INPROGRESS | IRQD_WAKEUP_ARMED))
 		return true;
 
 	/*