mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1 1/1] irqdomain: Use return value of strreplace()
@ 2023-06-28 15:02 Andy Shevchenko
  2023-06-30  9:18 ` [tip: irq/urgent] " tip-bot2 for Andy Shevchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2023-06-28 15:02 UTC (permalink / raw)
  To: Marc Zyngier, Johan Hovold, linux-kernel; +Cc: Thomas Gleixner, Andy Shevchenko

Since strreplace() returns the pointer to the string itself,
we may use it directly in the code.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 kernel/irq/irqdomain.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index 5bd01624e447..0bdef4fe925b 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -182,9 +182,7 @@ static struct irq_domain *__irq_domain_create(struct fwnode_handle *fwnode,
 			return NULL;
 		}
 
-		strreplace(name, '/', ':');
-
-		domain->name = name;
+		domain->name = strreplace(name, '/', ':');
 		domain->fwnode = fwnode;
 		domain->flags |= IRQ_DOMAIN_NAME_ALLOCATED;
 	}
-- 
2.40.0.1.gaa8946217a0b


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-06-30  9:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-28 15:02 [PATCH v1 1/1] irqdomain: Use return value of strreplace() Andy Shevchenko
2023-06-30  9:18 ` [tip: irq/urgent] " tip-bot2 for Andy Shevchenko

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®