[PATCH v2 2/3] perf/cxlpmu: Remove unintended newline from IRQ name format string

Alok Tiwari posted 3 patches 3 months, 2 weeks ago
[PATCH v2 2/3] perf/cxlpmu: Remove unintended newline from IRQ name format string
Posted by Alok Tiwari 3 months, 2 weeks ago
The IRQ name format string used in devm_kasprintf() mistakenly included
a newline character "\n".
This could lead to confusing log output or misformatted names in sysfs
or debug messages.

This fix removes the newline to ensure proper IRQ naming.

Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
---
 drivers/perf/cxl_pmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/perf/cxl_pmu.c b/drivers/perf/cxl_pmu.c
index 8998c0a2f3a2d..5a475a5a1f095 100644
--- a/drivers/perf/cxl_pmu.c
+++ b/drivers/perf/cxl_pmu.c
@@ -873,7 +873,7 @@ static int cxl_pmu_probe(struct device *dev)
 		return rc;
 	irq = rc;
 
-	irq_name = devm_kasprintf(dev, GFP_KERNEL, "%s_overflow\n", dev_name);
+	irq_name = devm_kasprintf(dev, GFP_KERNEL, "%s_overflow", dev_name);
 	if (!irq_name)
 		return -ENOMEM;
 
-- 
2.46.0
Re: [PATCH v2 2/3] perf/cxlpmu: Remove unintended newline from IRQ name format string
Posted by Jonathan Cameron 3 months, 2 weeks ago
On Tue, 24 Jun 2025 12:43:39 -0700
Alok Tiwari <alok.a.tiwari@oracle.com> wrote:

> The IRQ name format string used in devm_kasprintf() mistakenly included
> a newline character "\n".
> This could lead to confusing log output or misformatted names in sysfs
> or debug messages.
> 
> This fix removes the newline to ensure proper IRQ naming.
> 
> Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>

> ---
>  drivers/perf/cxl_pmu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/perf/cxl_pmu.c b/drivers/perf/cxl_pmu.c
> index 8998c0a2f3a2d..5a475a5a1f095 100644
> --- a/drivers/perf/cxl_pmu.c
> +++ b/drivers/perf/cxl_pmu.c
> @@ -873,7 +873,7 @@ static int cxl_pmu_probe(struct device *dev)
>  		return rc;
>  	irq = rc;
>  
> -	irq_name = devm_kasprintf(dev, GFP_KERNEL, "%s_overflow\n", dev_name);
> +	irq_name = devm_kasprintf(dev, GFP_KERNEL, "%s_overflow", dev_name);
>  	if (!irq_name)
>  		return -ENOMEM;
>