[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240604080914.38019-1-zeming@nfschina.com>
Date: Tue, 4 Jun 2024 16:09:14 +0800
From: Li zeming <zeming@...china.com>
To: tglx@...utronix.de
Cc: linux-kernel@...r.kernel.org,
Li zeming <zeming@...china.com>
Subject: [PATCH] irq: chip: Optimize the irq_set_irq_type function code
Optimize the position of ret and remove initialization assignments,
making the function look more aesthetically pleasing internally.
Signed-off-by: Li zeming <zeming@...china.com>
---
kernel/irq/chip.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index dc94e0bf2c94..1ce3d29abc90 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -64,9 +64,9 @@ EXPORT_SYMBOL(irq_set_chip);
*/
int irq_set_irq_type(unsigned int irq, unsigned int type)
{
+ int ret;
unsigned long flags;
struct irq_desc *desc = irq_get_desc_buslock(irq, &flags, IRQ_GET_DESC_CHECK_GLOBAL);
- int ret = 0;
if (!desc)
return -EINVAL;
--
2.18.2
Powered by blists - more mailing lists