Hi Bharat, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on robh/for-next] [also build test WARNING on linus/master v5.15-rc6 next-20211022] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Bharat-Bhushan/cn10k-DDR-Performance-monitor-support/20211018-122220 base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next config: hexagon-randconfig-r045-20211025 (attached as .config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project a461fa64bb37cffd73f683c74f6b0780379fc2ca) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/c165c120469cac5c73b7a7e9d027c284eb09c6d1 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Bharat-Bhushan/cn10k-DDR-Performance-monitor-support/20211018-122220 git checkout c165c120469cac5c73b7a7e9d027c284eb09c6d1 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=hexagon If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): drivers/perf/marvell_cn10k_ddr_pmu.c:352:9: error: implicit declaration of function 'readq_relaxed' [-Werror,-Wimplicit-function-declaration] val = readq_relaxed(pmu->base + reg); ^ drivers/perf/marvell_cn10k_ddr_pmu.c:359:3: error: implicit declaration of function 'writeq_relaxed' [-Werror,-Wimplicit-function-declaration] writeq_relaxed(val, pmu->base + reg); ^ drivers/perf/marvell_cn10k_ddr_pmu.c:359:3: note: did you mean 'readq_relaxed'? drivers/perf/marvell_cn10k_ddr_pmu.c:352:9: note: 'readq_relaxed' declared here val = readq_relaxed(pmu->base + reg); ^ drivers/perf/marvell_cn10k_ddr_pmu.c:361:9: error: implicit declaration of function 'readq_relaxed' [-Werror,-Wimplicit-function-declaration] val = readq_relaxed(pmu->base + DDRC_PERF_CNT_FREERUN_EN); ^ drivers/perf/marvell_cn10k_ddr_pmu.c:373:3: error: implicit declaration of function 'writeq_relaxed' [-Werror,-Wimplicit-function-declaration] writeq_relaxed(val, pmu->base + DDRC_PERF_CNT_FREERUN_EN); ^ drivers/perf/marvell_cn10k_ddr_pmu.c:382:10: error: implicit declaration of function 'readq_relaxed' [-Werror,-Wimplicit-function-declaration] return readq_relaxed(pmu->base + DDRC_PERF_CNT_VALUE_RD_OP); ^ drivers/perf/marvell_cn10k_ddr_pmu.c:443:3: error: implicit declaration of function 'writeq_relaxed' [-Werror,-Wimplicit-function-declaration] writeq_relaxed(val, pmu->base + reg_offset); ^ drivers/perf/marvell_cn10k_ddr_pmu.c:451:3: error: implicit declaration of function 'writeq_relaxed' [-Werror,-Wimplicit-function-declaration] writeq_relaxed(val, pmu->base + DDRC_PERF_CNT_FREERUN_CTRL); ^ drivers/perf/marvell_cn10k_ddr_pmu.c:493:2: error: implicit declaration of function 'writeq_relaxed' [-Werror,-Wimplicit-function-declaration] writeq_relaxed(START_OP_CTRL_VAL_START, ddr_pmu->base + ^ drivers/perf/marvell_cn10k_ddr_pmu.c:501:2: error: implicit declaration of function 'writeq_relaxed' [-Werror,-Wimplicit-function-declaration] writeq_relaxed(END_OP_CTRL_VAL_END, ddr_pmu->base + ^ drivers/perf/marvell_cn10k_ddr_pmu.c:527:2: error: implicit declaration of function 'writeq_relaxed' [-Werror,-Wimplicit-function-declaration] writeq_relaxed(OP_MODE_CTRL_VAL_MANNUAL, ddr_pmu->base + ^ >> drivers/perf/marvell_cn10k_ddr_pmu.c:549:10: warning: format specifies type 'unsigned long long' but the argument has type 'resource_size_t' (aka 'unsigned int') [-Wformat] res->start); ^~~~~~~~~~ drivers/perf/marvell_cn10k_ddr_pmu.c:557:50: warning: format specifies type 'unsigned long long' but the argument has type 'resource_size_t' (aka 'unsigned int') [-Wformat] pr_info("CN10K DDR PMU Driver for ddrc@%llx\n", res->start); ~~~~ ^~~~~~~~~~ %x include/linux/printk.h:519:34: note: expanded from macro 'pr_info' printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) ~~~ ^~~~~~~~~~~ include/linux/printk.h:446:60: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ~~~ ^~~~~~~~~~~ include/linux/printk.h:418:19: note: expanded from macro 'printk_index_wrap' _p_func(_fmt, ##__VA_ARGS__); \ ~~~~ ^~~~~~~~~~~ 2 warnings and 10 errors generated. vim +549 drivers/perf/marvell_cn10k_ddr_pmu.c 504 505 static int cn10k_ddr_perf_probe(struct platform_device *pdev) 506 { 507 struct cn10k_ddr_pmu *ddr_pmu; 508 struct resource *res; 509 void __iomem *base; 510 char *name; 511 int ret; 512 513 ddr_pmu = devm_kzalloc(&pdev->dev, sizeof(*ddr_pmu), GFP_KERNEL); 514 if (!ddr_pmu) 515 return -ENOMEM; 516 517 ddr_pmu->dev = &pdev->dev; 518 platform_set_drvdata(pdev, ddr_pmu); 519 520 base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); 521 if (IS_ERR(base)) 522 return PTR_ERR(base); 523 524 ddr_pmu->base = base; 525 526 /* Setup the PMU counter to work in manual mode */ 527 writeq_relaxed(OP_MODE_CTRL_VAL_MANNUAL, ddr_pmu->base + 528 DDRC_PERF_CNT_OP_MODE_CTRL); 529 530 ddr_pmu->pmu = (struct pmu) { 531 .module = THIS_MODULE, 532 .capabilities = PERF_PMU_CAP_NO_EXCLUDE, 533 .task_ctx_nr = perf_invalid_context, 534 .attr_groups = cn10k_attr_groups, 535 .event_init = cn10k_ddr_perf_event_init, 536 .add = cn10k_ddr_perf_event_add, 537 .del = cn10k_ddr_perf_event_del, 538 .start = cn10k_ddr_perf_event_start, 539 .stop = cn10k_ddr_perf_event_stop, 540 .read = cn10k_ddr_perf_event_update, 541 .pmu_enable = cn10k_ddr_perf_pmu_enable, 542 .pmu_disable = cn10k_ddr_perf_pmu_disable, 543 }; 544 545 /* Choose this cpu to collect perf data */ 546 ddr_pmu->cpu = raw_smp_processor_id(); 547 548 name = devm_kasprintf(ddr_pmu->dev, GFP_KERNEL, "mrvl_ddr_pmu_%llx", > 549 res->start); 550 if (!name) 551 return -ENOMEM; 552 553 ret = perf_pmu_register(&ddr_pmu->pmu, name, -1); 554 if (ret) 555 return ret; 556 557 pr_info("CN10K DDR PMU Driver for ddrc@%llx\n", res->start); 558 return 0; 559 } 560 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org