Hi Tuan,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.9 next-20201021]
[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/Tuan-Phan/driver-perf-Add-PMU-driver-for-the-ARM-DMC-620-memory-controller/20201021-071241
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
c4d6fe7311762f2e03b3c27ad38df7c40c80cc93
config: arm-allyesconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
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/95212570823403300bcf4fa4e38de366eeeee60c
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review 
Tuan-Phan/driver-perf-Add-PMU-driver-for-the-ARM-DMC-620-memory-controller/20201021-071241
        git checkout 95212570823403300bcf4fa4e38de366eeeee60c
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <l...@intel.com>

All warnings (new ones prefixed by >>):

   In file included from include/linux/ioport.h:15,
                    from include/linux/acpi.h:12,
                    from drivers/perf/arm_dmc620_pmu.c:12:
   drivers/perf/arm_dmc620_pmu.c: In function 'dmc620_pmu_enable_counter':
   include/linux/bits.h:36:11: warning: right shift count is negative 
[-Wshift-count-negative]
      36 |   (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
         |           ^~
   include/linux/bits.h:38:31: note: in expansion of macro '__GENMASK'
      38 |  (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                               ^~~~~~~~~
   drivers/perf/arm_dmc620_pmu.c:202:27: note: in expansion of macro 'GENMASK'
     202 |  ((((attr)->cfg) >> lo) & GENMASK(hi - lo, 0))
         |                           ^~~~~~~
   drivers/perf/arm_dmc620_pmu.c:205:2: note: in expansion of macro 
'_ATTR_CFG_GET_FLD'
     205 |  _ATTR_CFG_GET_FLD(attr,     \
         |  ^~~~~~~~~~~~~~~~~
   drivers/perf/arm_dmc620_pmu.c:328:8: note: in expansion of macro 
'ATTR_CFG_GET_FLD'
     328 |  reg = ATTR_CFG_GET_FLD(attr, mask);
         |        ^~~~~~~~~~~~~~~~
   include/linux/bits.h:36:11: warning: right shift count is negative 
[-Wshift-count-negative]
      36 |   (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
         |           ^~
   include/linux/bits.h:38:31: note: in expansion of macro '__GENMASK'
      38 |  (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                               ^~~~~~~~~
   drivers/perf/arm_dmc620_pmu.c:202:27: note: in expansion of macro 'GENMASK'
     202 |  ((((attr)->cfg) >> lo) & GENMASK(hi - lo, 0))
         |                           ^~~~~~~
   drivers/perf/arm_dmc620_pmu.c:205:2: note: in expansion of macro 
'_ATTR_CFG_GET_FLD'
     205 |  _ATTR_CFG_GET_FLD(attr,     \
         |  ^~~~~~~~~~~~~~~~~
   drivers/perf/arm_dmc620_pmu.c:334:8: note: in expansion of macro 
'ATTR_CFG_GET_FLD'
     334 |  reg = ATTR_CFG_GET_FLD(attr, match);
         |        ^~~~~~~~~~~~~~~~
   drivers/perf/arm_dmc620_pmu.c: In function 'dmc620_pmu_device_probe':
>> drivers/perf/arm_dmc620_pmu.c:677:14: warning: format '%llx' expects 
>> argument of type 'long long unsigned int', but argument 5 has type 
>> 'resource_size_t' {aka 'unsigned int'} [-Wformat=]
     677 |       "%s_%llx", DMC620_PMUNAME,
         |           ~~~^
         |              |
         |              long long unsigned int
         |           %x

vim +677 drivers/perf/arm_dmc620_pmu.c

   629  
   630  static int dmc620_pmu_device_probe(struct platform_device *pdev)
   631  {
   632          struct dmc620_pmu *dmc620_pmu;
   633          struct resource *res;
   634          char *name;
   635          int irq_num;
   636          int i, ret;
   637  
   638          dmc620_pmu = devm_kzalloc(&pdev->dev,
   639                          sizeof(struct dmc620_pmu), GFP_KERNEL);
   640          if (!dmc620_pmu)
   641                  return -ENOMEM;
   642  
   643          dmc620_pmu->pdev = pdev;
   644          platform_set_drvdata(pdev, dmc620_pmu);
   645  
   646          dmc620_pmu->pmu = (struct pmu) {
   647                  .module = THIS_MODULE,
   648                  .capabilities   = PERF_PMU_CAP_NO_EXCLUDE,
   649                  .task_ctx_nr    = perf_invalid_context,
   650                  .event_init     = dmc620_pmu_event_init,
   651                  .add            = dmc620_pmu_add,
   652                  .del            = dmc620_pmu_del,
   653                  .start          = dmc620_pmu_start,
   654                  .stop           = dmc620_pmu_stop,
   655                  .read           = dmc620_pmu_read,
   656                  .attr_groups    = dmc620_pmu_attr_groups,
   657          };
   658  
   659          res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
   660          dmc620_pmu->base = devm_ioremap_resource(&pdev->dev, res);
   661          if (IS_ERR(dmc620_pmu->base))
   662                  return PTR_ERR(dmc620_pmu->base);
   663  
   664          /* Make sure device is reset before enabling interrupt */
   665          for (i = 0; i < DMC620_PMU_MAX_COUNTERS; i++)
   666                  dmc620_pmu_creg_write(dmc620_pmu, i, 
DMC620_PMU_COUNTERn_CONTROL, 0);
   667  
   668          irq_num = platform_get_irq(pdev, 0);
   669          if (irq_num < 0)
   670                  return irq_num;
   671  
   672          ret = dmc620_pmu_get_irq(dmc620_pmu, irq_num);
   673          if (ret)
   674                  return ret;
   675  
   676          name = devm_kasprintf(&pdev->dev, GFP_KERNEL,
 > 677                                    "%s_%llx", DMC620_PMUNAME,
   678                                    (res->start) >> DMC620_PA_SHIFT);
   679          if (!name) {
   680                  dev_err(&pdev->dev,
   681                            "Create name failed, PMU @%pa\n", 
&res->start);
   682                  goto out_teardown_dev;
   683          }
   684  
   685          ret = perf_pmu_register(&dmc620_pmu->pmu, name, -1);
   686          if (ret)
   687                  goto out_teardown_dev;
   688  
   689          return 0;
   690  
   691  out_teardown_dev:
   692          dmc620_pmu_put_irq(dmc620_pmu);
   693          synchronize_rcu();
   694          return ret;
   695  }
   696  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org

Attachment: .config.gz
Description: application/gzip

Reply via email to