* [PATCH] irq: chip: Optimize the irq_set_irq_type function code
@ 2024-06-04 8:09 Li zeming
2024-06-04 17:52 ` Thomas Gleixner
0 siblings, 1 reply; 2+ messages in thread
From: Li zeming @ 2024-06-04 8:09 UTC (permalink / raw)
To: tglx; +Cc: linux-kernel, Li zeming
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] irq: chip: Optimize the irq_set_irq_type function code
2024-06-04 8:09 [PATCH] irq: chip: Optimize the irq_set_irq_type function code Li zeming
@ 2024-06-04 17:52 ` Thomas Gleixner
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Gleixner @ 2024-06-04 17:52 UTC (permalink / raw)
To: Li zeming; +Cc: linux-kernel, Li zeming
On Tue, Jun 04 2024 at 16:09, Li zeming wrote:
> Optimize the position of ret and remove initialization assignments,
> making the function look more aesthetically pleasing internally.
And thereby violating the coding style guide of the tip tree:
Documentation/processs/maintainers-tip.rst
Which also contains a guide how to select the subject prefix.
Thanks,
tglx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-06-04 17:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-04 8:09 [PATCH] irq: chip: Optimize the irq_set_irq_type function code Li zeming
2024-06-04 17:52 ` Thomas Gleixner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox