* [PATCH] ARM: cache-l2x0-pmu: Delete an error message for a failed memory allocation in l2x0_pmu_init
@ 2017-10-03 9:23 SF Markus Elfring
2017-10-03 10:07 ` [PATCH] ARM: cache-l2x0-pmu: Delete an error message for a failed memory allocation in l2x0_pmu_ Mark Rutland
0 siblings, 1 reply; 2+ messages in thread
From: SF Markus Elfring @ 2017-10-03 9:23 UTC (permalink / raw)
To: linux-arm-kernel
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 3 Oct 2017 11:16:56 +0200
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
arch/arm/mm/cache-l2x0-pmu.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/arm/mm/cache-l2x0-pmu.c b/arch/arm/mm/cache-l2x0-pmu.c
index 0a1e2280141f..b3734da93010 100644
--- a/arch/arm/mm/cache-l2x0-pmu.c
+++ b/arch/arm/mm/cache-l2x0-pmu.c
@@ -528,10 +528,8 @@ static __init int l2x0_pmu_init(void)
return 0;
l2x0_pmu = kzalloc(sizeof(*l2x0_pmu), GFP_KERNEL);
- if (!l2x0_pmu) {
- pr_warn("Unable to allocate L2x0 PMU\n");
+ if (!l2x0_pmu)
return -ENOMEM;
- }
*l2x0_pmu = (struct pmu) {
.task_ctx_nr = perf_invalid_context,
--
2.14.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ARM: cache-l2x0-pmu: Delete an error message for a failed memory allocation in l2x0_pmu_
2017-10-03 9:23 [PATCH] ARM: cache-l2x0-pmu: Delete an error message for a failed memory allocation in l2x0_pmu_init SF Markus Elfring
@ 2017-10-03 10:07 ` Mark Rutland
0 siblings, 0 replies; 2+ messages in thread
From: Mark Rutland @ 2017-10-03 10:07 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Oct 03, 2017 at 11:23:23AM +0200, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Tue, 3 Oct 2017 11:16:56 +0200
>
> Omit an extra message for a memory allocation failure in this function.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
FWIW:
Acked-by: Mark Rutland <mark.rutland@arm.com>
I assume you'll drop this in Russell's patch system.
Thanks,
Mark.
> ---
> arch/arm/mm/cache-l2x0-pmu.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/arch/arm/mm/cache-l2x0-pmu.c b/arch/arm/mm/cache-l2x0-pmu.c
> index 0a1e2280141f..b3734da93010 100644
> --- a/arch/arm/mm/cache-l2x0-pmu.c
> +++ b/arch/arm/mm/cache-l2x0-pmu.c
> @@ -528,10 +528,8 @@ static __init int l2x0_pmu_init(void)
> return 0;
>
> l2x0_pmu = kzalloc(sizeof(*l2x0_pmu), GFP_KERNEL);
> - if (!l2x0_pmu) {
> - pr_warn("Unable to allocate L2x0 PMU\n");
> + if (!l2x0_pmu)
> return -ENOMEM;
> - }
>
> *l2x0_pmu = (struct pmu) {
> .task_ctx_nr = perf_invalid_context,
> --
> 2.14.2
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-03 10:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-03 9:23 [PATCH] ARM: cache-l2x0-pmu: Delete an error message for a failed memory allocation in l2x0_pmu_init SF Markus Elfring
2017-10-03 10:07 ` [PATCH] ARM: cache-l2x0-pmu: Delete an error message for a failed memory allocation in l2x0_pmu_ Mark Rutland
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).