[PATCH 0/4] drivers/perf: Fix ERRORs reported by checkpatch

STALE1932d

6 messages, 2 authors, 2021-05-25 · open the first message on its own page

[PATCH 0/4] drivers/perf: Fix ERRORs reported by checkpatch

From: Jay Fang <f.fangjian@huawei.com>
Date: 2021-05-11 13:24:49

From: Junhao He <redacted>

This patch-set fix some coding style issues reported by checkpatch tool.

Junhao He (4):
  drivers/perf: arm_spe_pmu: Fix some coding style issues
  drivers/perf: arm_pmu: Fix some coding style issues
  drivers/perf: arm-cmn: Add space after ','
  drivers/perf: arm-cci: Fix checkpatch spacing error

 drivers/perf/arm-cci.c     | 4 ++--
 drivers/perf/arm-cmn.c     | 2 +-
 drivers/perf/arm_pmu.c     | 6 ++----
 drivers/perf/arm_spe_pmu.c | 5 +----
 4 files changed, 6 insertions(+), 11 deletions(-)

-- 
2.8.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

[PATCH 4/4] drivers/perf: arm-cci: Fix checkpatch spacing error

From: Jay Fang <f.fangjian@huawei.com>
Date: 2021-05-11 13:24:08

From: Junhao He <redacted>

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

ERROR: need consistent spacing around '-' (ctx:WxV)
ERROR: space required before the open parenthesis '('

Signed-off-by: Junhao He <redacted>
Signed-off-by: Jay Fang <f.fangjian@huawei.com>
---
 drivers/perf/arm-cci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/perf/arm-cci.c b/drivers/perf/arm-cci.c
index 666d8a9..54aca3a6 100644
--- a/drivers/perf/arm-cci.c
+++ b/drivers/perf/arm-cci.c
@@ -37,7 +37,7 @@
 
 #define CCI_PMU_CNTR_SIZE(model)	((model)->cntr_size)
 #define CCI_PMU_CNTR_BASE(model, idx)	((idx) * CCI_PMU_CNTR_SIZE(model))
-#define CCI_PMU_CNTR_MASK		((1ULL << 32) -1)
+#define CCI_PMU_CNTR_MASK		((1ULL << 32) - 1)
 #define CCI_PMU_CNTR_LAST(cci_pmu)	(cci_pmu->num_cntrs - 1)
 
 #define CCI_PMU_MAX_HW_CNTRS(model) \
@@ -806,7 +806,7 @@ static int pmu_get_event_idx(struct cci_pmu_hw_events *hw, struct perf_event *ev
 		return cci_pmu->model->get_event_idx(cci_pmu, hw, cci_event);
 
 	/* Generic code to find an unused idx from the mask */
-	for(idx = 0; idx <= CCI_PMU_CNTR_LAST(cci_pmu); idx++)
+	for (idx = 0; idx <= CCI_PMU_CNTR_LAST(cci_pmu); idx++)
 		if (!test_and_set_bit(idx, hw->used_mask))
 			return idx;
 
-- 
2.8.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

From: Jay Fang <f.fangjian@huawei.com>
Date: 2021-05-11 13:24:26

From: Junhao He <redacted>

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 <redacted>
Signed-off-by: Jay Fang <f.fangjian@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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

[PATCH 1/4] drivers/perf: arm_spe_pmu: Fix some coding style issues

From: Jay Fang <f.fangjian@huawei.com>
Date: 2021-05-11 13:25:31

From: Junhao He <redacted>

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

WARNING: void function return statements are not generally useful
WARNING: Possible unnecessary 'out of memory' message

Signed-off-by: Junhao He <redacted>
Signed-off-by: Jay Fang <f.fangjian@huawei.com>
---
 drivers/perf/arm_spe_pmu.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/perf/arm_spe_pmu.c b/drivers/perf/arm_spe_pmu.c
index 8a1e86a..e3711cb 100644
--- a/drivers/perf/arm_spe_pmu.c
+++ b/drivers/perf/arm_spe_pmu.c
@@ -1044,7 +1044,6 @@ static void __arm_spe_pmu_dev_probe(void *info)
 		 spe_pmu->max_record_sz, spe_pmu->align, spe_pmu->features);
 
 	spe_pmu->features |= SPE_PMU_FEAT_DEV_PROBED;
-	return;
 }
 
 static void __arm_spe_pmu_reset_local(void)
@@ -1190,10 +1189,8 @@ static int arm_spe_pmu_device_probe(struct platform_device *pdev)
 	}
 
 	spe_pmu = devm_kzalloc(dev, sizeof(*spe_pmu), GFP_KERNEL);
-	if (!spe_pmu) {
-		dev_err(dev, "failed to allocate spe_pmu\n");
+	if (!spe_pmu)
 		return -ENOMEM;
-	}
 
 	spe_pmu->handle = alloc_percpu(typeof(*spe_pmu->handle));
 	if (!spe_pmu->handle)
-- 
2.8.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

[PATCH 3/4] drivers/perf: arm-cmn: Add space after ','

From: Jay Fang <f.fangjian@huawei.com>
Date: 2021-05-11 13:25:50

From: Junhao He <redacted>

Fix a warning from checkpatch.pl.

ERROR: space required after that ',' (ctx:VxV)

Signed-off-by: Junhao He <redacted>
Signed-off-by: Jay Fang <f.fangjian@huawei.com>
---
 drivers/perf/arm-cmn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
index 56a5c35..d5b2372 100644
--- a/drivers/perf/arm-cmn.c
+++ b/drivers/perf/arm-cmn.c
@@ -31,7 +31,7 @@
 #define CMN_CI_CHILD_COUNT		GENMASK_ULL(15, 0)
 #define CMN_CI_CHILD_PTR_OFFSET		GENMASK_ULL(31, 16)
 
-#define CMN_CHILD_NODE_ADDR		GENMASK(27,0)
+#define CMN_CHILD_NODE_ADDR		GENMASK(27, 0)
 #define CMN_CHILD_NODE_EXTERNAL		BIT(31)
 
 #define CMN_ADDR_NODE_PTR		GENMASK(27, 14)
-- 
2.8.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Re: [PATCH 0/4] drivers/perf: Fix ERRORs reported by checkpatch

From: Will Deacon <will@kernel.org>
Date: 2021-05-25 19:21:47

On Tue, 11 May 2021 20:27:30 +0800, Jay Fang wrote:
This patch-set fix some coding style issues reported by checkpatch tool.

Junhao He (4):
  drivers/perf: arm_spe_pmu: Fix some coding style issues
  drivers/perf: arm_pmu: Fix some coding style issues
  drivers/perf: arm-cmn: Add space after ','
  drivers/perf: arm-cci: Fix checkpatch spacing error

[...]
Applied to will (for-next/perf), thanks!

[1/4] drivers/perf: arm_spe_pmu: Fix some coding style issues
      https://git.kernel.org/will/c/27e448207571
[2/4] drivers/perf: arm_pmu: Fix some coding style issues
      https://git.kernel.org/will/c/f265fd166bce
[3/4] drivers/perf: arm-cmn: Add space after ','
      https://git.kernel.org/will/c/a9f00c9760fe
[4/4] drivers/perf: arm-cci: Fix checkpatch spacing error
      https://git.kernel.org/will/c/eb2b22f024c3

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help