[PATCH 2/4] drivers/perf: arm_pmu: Fix some coding style issues

Jay Fang f.fangjian at huawei.com
Tue May 11 05:27:32 PDT 2021


From: Junhao He <hejunhao2 at hisilicon.com>

Fix some coding style issues reported by checkpatch.pl, including
following types:

ERROR: spaces required around that '=' (ctx:VxW)
WARNING: Possible unnecessary 'out of memory' message

Signed-off-by: Junhao He <hejunhao2 at hisilicon.com>
Signed-off-by: Jay Fang <f.fangjian at huawei.com>
---
 drivers/perf/arm_pmu.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/perf/arm_pmu.c b/drivers/perf/arm_pmu.c
index d4f7f1f..e57b348 100644
--- a/drivers/perf/arm_pmu.c
+++ b/drivers/perf/arm_pmu.c
@@ -670,7 +670,7 @@ int armpmu_request_irq(int irq, int cpu)
 						 &cpu_armpmu);
 			irq_ops = &percpu_pmuirq_ops;
 		} else {
-			has_nmi= true;
+			has_nmi = true;
 			irq_ops = &percpu_pmunmi_ops;
 		}
 	} else {
@@ -869,10 +869,8 @@ static struct arm_pmu *__armpmu_alloc(gfp_t flags)
 	int cpu;
 
 	pmu = kzalloc(sizeof(*pmu), flags);
-	if (!pmu) {
-		pr_info("failed to allocate PMU device!\n");
+	if (!pmu)
 		goto out;
-	}
 
 	pmu->hw_events = alloc_percpu_gfp(struct pmu_hw_events, flags);
 	if (!pmu->hw_events) {
-- 
2.8.1




More information about the linux-arm-kernel mailing list