* [PATCH 1/4] drivers/perf: arm_spe_pmu: Fix some coding style issues
2021-05-11 12:27 [PATCH 0/4] drivers/perf: Fix ERRORs reported by checkpatch Jay Fang
@ 2021-05-11 12:27 ` Jay Fang
2021-05-11 12:27 ` [PATCH 2/4] drivers/perf: arm_pmu: " Jay Fang
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Jay Fang @ 2021-05-11 12:27 UTC (permalink / raw)
To: will, mark.rutland; +Cc: linux-arm-kernel, linuxarm, huangdaode, hejunhao2
From: Junhao He <hejunhao2@hisilicon.com>
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 <hejunhao2@hisilicon.com>
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/4] drivers/perf: arm_pmu: Fix some coding style issues
2021-05-11 12:27 [PATCH 0/4] drivers/perf: Fix ERRORs reported by checkpatch Jay Fang
2021-05-11 12:27 ` [PATCH 1/4] drivers/perf: arm_spe_pmu: Fix some coding style issues Jay Fang
@ 2021-05-11 12:27 ` Jay Fang
2021-05-11 12:27 ` [PATCH 3/4] drivers/perf: arm-cmn: Add space after ',' Jay Fang
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Jay Fang @ 2021-05-11 12:27 UTC (permalink / raw)
To: will, mark.rutland; +Cc: linux-arm-kernel, linuxarm, huangdaode, hejunhao2
From: Junhao He <hejunhao2@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@hisilicon.com>
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/4] drivers/perf: arm-cmn: Add space after ','
2021-05-11 12:27 [PATCH 0/4] drivers/perf: Fix ERRORs reported by checkpatch Jay Fang
2021-05-11 12:27 ` [PATCH 1/4] drivers/perf: arm_spe_pmu: Fix some coding style issues Jay Fang
2021-05-11 12:27 ` [PATCH 2/4] drivers/perf: arm_pmu: " Jay Fang
@ 2021-05-11 12:27 ` Jay Fang
2021-05-11 12:27 ` [PATCH 4/4] drivers/perf: arm-cci: Fix checkpatch spacing error Jay Fang
2021-05-25 18:58 ` [PATCH 0/4] drivers/perf: Fix ERRORs reported by checkpatch Will Deacon
4 siblings, 0 replies; 6+ messages in thread
From: Jay Fang @ 2021-05-11 12:27 UTC (permalink / raw)
To: will, mark.rutland; +Cc: linux-arm-kernel, linuxarm, huangdaode, hejunhao2
From: Junhao He <hejunhao2@hisilicon.com>
Fix a warning from checkpatch.pl.
ERROR: space required after that ',' (ctx:VxV)
Signed-off-by: Junhao He <hejunhao2@hisilicon.com>
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/4] drivers/perf: arm-cci: Fix checkpatch spacing error
2021-05-11 12:27 [PATCH 0/4] drivers/perf: Fix ERRORs reported by checkpatch Jay Fang
` (2 preceding siblings ...)
2021-05-11 12:27 ` [PATCH 3/4] drivers/perf: arm-cmn: Add space after ',' Jay Fang
@ 2021-05-11 12:27 ` Jay Fang
2021-05-25 18:58 ` [PATCH 0/4] drivers/perf: Fix ERRORs reported by checkpatch Will Deacon
4 siblings, 0 replies; 6+ messages in thread
From: Jay Fang @ 2021-05-11 12:27 UTC (permalink / raw)
To: will, mark.rutland; +Cc: linux-arm-kernel, linuxarm, huangdaode, hejunhao2
From: Junhao He <hejunhao2@hisilicon.com>
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 <hejunhao2@hisilicon.com>
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/4] drivers/perf: Fix ERRORs reported by checkpatch
2021-05-11 12:27 [PATCH 0/4] drivers/perf: Fix ERRORs reported by checkpatch Jay Fang
` (3 preceding siblings ...)
2021-05-11 12:27 ` [PATCH 4/4] drivers/perf: arm-cci: Fix checkpatch spacing error Jay Fang
@ 2021-05-25 18:58 ` Will Deacon
4 siblings, 0 replies; 6+ messages in thread
From: Will Deacon @ 2021-05-25 18:58 UTC (permalink / raw)
To: mark.rutland, Jay Fang
Cc: catalin.marinas, kernel-team, Will Deacon, huangdaode, hejunhao2,
linuxarm, linux-arm-kernel
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
^ permalink raw reply [flat|nested] 6+ messages in thread