[PATCH drivers/perf 1/4] drivers/perf: fixing coding style issues

Tian Tao tiantao6 at hisilicon.com
Thu Mar 25 07:16:21 GMT 2021


  no functional changes.

  Fix checkpatch error:
  ERROR: need consistent spacing around '-' (ctx:WxV)
  #40: FILE: arm-cci.c:40:
  +#define CCI_PMU_CNTR_MASK	    ((1ULL << 32) -1)

  ERROR: space required before the open parenthesis '('
  #809: FILE: arm-cci.c:809:
  + for(idx = 0; idx <= CCI_PMU_CNTR_LAST(cci_pmu); idx++)

Signed-off-by: Tian Tao <tiantao6 at hisilicon.com>
Signed-off-by: Junhao He <hejunhao2 at hisilicon.com>
Signed-off-by: Qi Liu <liuqi115 at 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 f81e2ec..18ee364 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.7.4




More information about the linux-arm-kernel mailing list