Re: [PATCH] bus: arm-cci: constify attribute_group structures.

From: kbuild test robot
Date: Sun Jul 16 2017 - 05:20:04 EST


Hi Arvind,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.13-rc1 next-20170714]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Arvind-Yadav/bus-arm-cci-constify-attribute_group-structures/20170704-185609
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm64

All errors (new ones prefixed by >>):

drivers//bus/arm-cci.c: In function 'cci_pmu_init':
>> drivers//bus/arm-cci.c:1475:29: error: assignment of member 'attrs' in read-only object
pmu_event_attr_group.attrs = model->event_attrs;
^
drivers//bus/arm-cci.c:1476:30: error: assignment of member 'attrs' in read-only object
pmu_format_attr_group.attrs = model->format_attrs;
^

vim +/attrs +1475 drivers//bus/arm-cci.c

c6f85cb4 Mark Rutland 2014-06-30 1468
c6f85cb4 Mark Rutland 2014-06-30 1469 static int cci_pmu_init(struct cci_pmu *cci_pmu, struct platform_device *pdev)
c6f85cb4 Mark Rutland 2014-06-30 1470 {
5e442eba Mark Rutland 2016-02-23 1471 const struct cci_pmu_model *model = cci_pmu->model;
5e442eba Mark Rutland 2016-02-23 1472 char *name = model->name;
ab5b316d Suzuki K. Poulose 2015-05-26 1473 u32 num_cntrs;
e14cfad3 Suzuki K. Poulose 2015-05-26 1474
5e442eba Mark Rutland 2016-02-23 @1475 pmu_event_attr_group.attrs = model->event_attrs;
5e442eba Mark Rutland 2016-02-23 1476 pmu_format_attr_group.attrs = model->format_attrs;
a1a076d7 Suzuki K. Poulose 2015-05-26 1477
c6f85cb4 Mark Rutland 2014-06-30 1478 cci_pmu->pmu = (struct pmu) {
fc17c839 Suzuki K. Poulose 2015-03-18 1479 .name = cci_pmu->model->name,
c6f85cb4 Mark Rutland 2014-06-30 1480 .task_ctx_nr = perf_invalid_context,
c6f85cb4 Mark Rutland 2014-06-30 1481 .pmu_enable = cci_pmu_enable,
c6f85cb4 Mark Rutland 2014-06-30 1482 .pmu_disable = cci_pmu_disable,
c6f85cb4 Mark Rutland 2014-06-30 1483 .event_init = cci_pmu_event_init,
c6f85cb4 Mark Rutland 2014-06-30 1484 .add = cci_pmu_add,
c6f85cb4 Mark Rutland 2014-06-30 1485 .del = cci_pmu_del,
c6f85cb4 Mark Rutland 2014-06-30 1486 .start = cci_pmu_start,
c6f85cb4 Mark Rutland 2014-06-30 1487 .stop = cci_pmu_stop,
c6f85cb4 Mark Rutland 2014-06-30 1488 .read = pmu_read,
c6f85cb4 Mark Rutland 2014-06-30 1489 .attr_groups = pmu_attr_groups,
b91c8f28 Punit Agrawal 2013-08-22 1490 };
b91c8f28 Punit Agrawal 2013-08-22 1491
b91c8f28 Punit Agrawal 2013-08-22 1492 cci_pmu->plat_device = pdev;
ab5b316d Suzuki K. Poulose 2015-05-26 1493 num_cntrs = pmu_get_max_counters();
ab5b316d Suzuki K. Poulose 2015-05-26 1494 if (num_cntrs > cci_pmu->model->num_hw_cntrs) {
ab5b316d Suzuki K. Poulose 2015-05-26 1495 dev_warn(&pdev->dev,
ab5b316d Suzuki K. Poulose 2015-05-26 1496 "PMU implements more counters(%d) than supported by"
ab5b316d Suzuki K. Poulose 2015-05-26 1497 " the model(%d), truncated.",
ab5b316d Suzuki K. Poulose 2015-05-26 1498 num_cntrs, cci_pmu->model->num_hw_cntrs);
ab5b316d Suzuki K. Poulose 2015-05-26 1499 num_cntrs = cci_pmu->model->num_hw_cntrs;
ab5b316d Suzuki K. Poulose 2015-05-26 1500 }
ab5b316d Suzuki K. Poulose 2015-05-26 1501 cci_pmu->num_cntrs = num_cntrs + cci_pmu->model->fixed_hw_cntrs;
b91c8f28 Punit Agrawal 2013-08-22 1502
c6f85cb4 Mark Rutland 2014-06-30 1503 return perf_pmu_register(&cci_pmu->pmu, name, -1);
c6f85cb4 Mark Rutland 2014-06-30 1504 }
c6f85cb4 Mark Rutland 2014-06-30 1505

:::::: The code at line 1475 was first introduced by commit
:::::: 5e442eba342e567e2b3f1a39a24f81559f8370f7 arm-cci: simplify sysfs attr handling

:::::: TO: Mark Rutland <mark.rutland@xxxxxxx>
:::::: CC: Will Deacon <will.deacon@xxxxxxx>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip