From: Li zeming <zeming@nfschina.com>
To: tglx@linutronix.de
Cc: linux-kernel@vger.kernel.org, Li zeming <zeming@nfschina.com>
Subject: [PATCH] irq: chip: Optimize the irq_set_irq_type function code
Date: Tue, 4 Jun 2024 16:09:14 +0800 [thread overview]
Message-ID: <20240604080914.38019-1-zeming@nfschina.com> (raw)
Optimize the position of ret and remove initialization assignments,
making the function look more aesthetically pleasing internally.
Signed-off-by: Li zeming <zeming@nfschina.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
next reply other threads:[~2024-06-04 8:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-04 8:09 Li zeming [this message]
2024-06-04 17:52 ` Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240604080914.38019-1-zeming@nfschina.com \
--to=zeming@nfschina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®