Re: [PATCH 2/2] soc: qcom: Introduce RPM master stats driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Konrad,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 8417c8f5007bf4567ccffda850a3157c7d905f67]

url:    https://github.com/intel-lab-lkp/linux/commits/Konrad-Dybcio/dt-bindings-soc-qcom-Add-RPM-Master-stats/20230405-230341
base:   8417c8f5007bf4567ccffda850a3157c7d905f67
patch link:    https://lore.kernel.org/r/20230405-topic-master_stats-v1-2-1b1fa2739953%40linaro.org
patch subject: [PATCH 2/2] soc: qcom: Introduce RPM master stats driver
config: loongarch-allyesconfig (https://download.01.org/0day-ci/archive/20230406/202304060002.HLUjkH63-lkp@xxxxxxxxx/config)
compiler: loongarch64-linux-gcc (GCC) 12.1.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/intel-lab-lkp/linux/commit/76fec5cd8630399cfdb8612093bfa0a5d0d98ea9
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Konrad-Dybcio/dt-bindings-soc-qcom-Add-RPM-Master-stats/20230405-230341
        git checkout 76fec5cd8630399cfdb8612093bfa0a5d0d98ea9
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch SHELL=/bin/bash drivers/soc/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Link: https://lore.kernel.org/oe-kbuild-all/202304060002.HLUjkH63-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   drivers/soc/qcom/rpm_master_stats.c: In function 'master_stats_probe':
>> drivers/soc/qcom/rpm_master_stats.c:92:83: warning: format '%s' expects argument of type 'char *', but argument 4 has type 'int' [-Wformat=]
      92 |                                              "Couldn't parse MSG RAM phandle idx %s", i);
         |                                                                                  ~^   ~
         |                                                                                   |   |
         |                                                                                   |   int
         |                                                                                   char *
         |                                                                                  %d


vim +92 drivers/soc/qcom/rpm_master_stats.c

    66	
    67	static int master_stats_probe(struct platform_device *pdev)
    68	{
    69		struct device *dev = &pdev->dev;
    70		struct device_node *msgram_np;
    71		struct master_stats_data *d;
    72		struct dentry *dent, *root;
    73		struct resource res;
    74		int count, i, ret;
    75	
    76		count = of_property_count_strings(dev->of_node, "qcom,master-names");
    77		if (count < 0)
    78			return count;
    79	
    80		d = devm_kzalloc(dev, count * sizeof(*d), GFP_KERNEL);
    81		if (!d)
    82			return -ENOMEM;
    83	
    84		root = debugfs_create_dir("rpm_master_stats", NULL);
    85		platform_set_drvdata(pdev, root);
    86	
    87		for (i = 0; i < count; i++) {
    88			msgram_np = of_parse_phandle(dev->of_node, "qcom,rpm-msg-ram", i);
    89			if (!msgram_np) {
    90				debugfs_remove_recursive(root);
    91				return dev_err_probe(dev, -EINVAL,
  > 92						     "Couldn't parse MSG RAM phandle idx %s", i);
    93			}
    94	
    95			/*
    96			 * Purposefully skip devm_platform helpers as we're using a
    97			 * shared resource.
    98			 */
    99			ret = of_address_to_resource(msgram_np, 0, &res);
   100			if (ret < 0) {
   101				debugfs_remove_recursive(root);
   102				return ret;
   103			}
   104	
   105			d[i].base = devm_ioremap(dev, res.start, resource_size(&res));
   106			if (IS_ERR(d[i].base)) {
   107				debugfs_remove_recursive(root);
   108				return dev_err_probe(dev, -EINVAL,
   109						     "Could not map the MSG RAM slice idx %d!\n", i);
   110			}
   111	
   112			ret = of_property_read_string_index(dev->of_node, "qcom,master-names", i,
   113							    &d[i].label);
   114			if (ret < 0) {
   115				debugfs_remove_recursive(root);
   116				return dev_err_probe(dev, ret,
   117						     "Could not read name idx %d!\n", i);
   118			}
   119	
   120			/*
   121			 * Generally it's not advised to fail on debugfs errors, but this
   122			 * driver's only job is exposing data therein.
   123			 */
   124			dent = debugfs_create_file(d[i].label, 0444, root,
   125						   &d[i], &master_stats_fops);
   126			if (!dent) {
   127				debugfs_remove_recursive(root);
   128				return -EINVAL;
   129			}
   130		}
   131	
   132		device_set_pm_not_required(dev);
   133	
   134		return 0;
   135	}
   136	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux