From: Markus Elfring <Markus.Elfring@web.de>
To: kernel-janitors@vger.kernel.org, Marc Zyngier <maz@kernel.org>,
Shawn Guo <shawn.guo@linaro.org>,
Thomas Gleixner <tglx@linutronix.de>
Cc: LKML <linux-kernel@vger.kernel.org>,
Chenyuan Yang <chenyuan0y@gmail.com>
Subject: [PATCH] irqchip/qcom-mpm: Replace devm_kasprintf() call by devm_kstrdup() in qcom_mpm_init()
Date: Wed, 16 Apr 2025 15:55:06 +0200 [thread overview]
Message-ID: <1145f48a-658b-4745-a8b3-724f33c3f1ee@web.de> (raw)
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 16 Apr 2025 15:43:46 +0200
Use a devm_kstrdup() call instead of a devm_kasprintf() call
in this function implementation because only a single string
should be copied.
The source code was transformed by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/irqchip/irq-qcom-mpm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-qcom-mpm.c b/drivers/irqchip/irq-qcom-mpm.c
index 7942d8eb3d00..d3e398e03d3f 100644
--- a/drivers/irqchip/irq-qcom-mpm.c
+++ b/drivers/irqchip/irq-qcom-mpm.c
@@ -414,7 +414,7 @@ static int qcom_mpm_init(struct device_node *np, struct device_node *parent)
genpd->flags = GENPD_FLAG_IRQ_SAFE;
genpd->power_off = mpm_pd_power_off;
- genpd->name = devm_kasprintf(dev, GFP_KERNEL, "%s", dev_name(dev));
+ genpd->name = devm_kstrdup(dev, dev_name(dev), GFP_KERNEL);
if (!genpd->name)
return -ENOMEM;
--
2.49.0
reply other threads:[~2025-04-16 13:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1145f48a-658b-4745-a8b3-724f33c3f1ee@web.de \
--to=markus.elfring@web.de \
--cc=chenyuan0y@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=shawn.guo@linaro.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®