linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [vireshk-pm:opp/config 17/33] drivers/cpufreq/ti-cpufreq.c:331:33: error: initialization of 'const u32 *' {aka 'const unsigned int *'} from incompatible pointer type 'u32 (*)[2]' {aka 'unsigned int (*)[2]'}
@ 2022-05-25 19:34 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-05-25 19:34 UTC (permalink / raw)
  To: Viresh Kumar; +Cc: kbuild-all, linux-kernel

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git opp/config
head:   d730dc101c586defb49eeafd8eea9b7bb0baa01b
commit: f834c0b7a54d96f6322c544479bbe897309b4a0a [17/33] cpufreq: ti: Migrate to dev_pm_opp_set_config()
config: arm-allmodconfig (https://download.01.org/0day-ci/archive/20220526/202205260322.hhkrrLYq-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.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://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git/commit/?id=f834c0b7a54d96f6322c544479bbe897309b4a0a
        git remote add vireshk-pm https://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git
        git fetch --no-tags vireshk-pm opp/config
        git checkout f834c0b7a54d96f6322c544479bbe897309b4a0a
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/cpufreq/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/cpufreq/ti-cpufreq.c: In function 'ti_cpufreq_probe':
>> drivers/cpufreq/ti-cpufreq.c:331:33: error: initialization of 'const u32 *' {aka 'const unsigned int *'} from incompatible pointer type 'u32 (*)[2]' {aka 'unsigned int (*)[2]'} [-Werror=incompatible-pointer-types]
     331 |                 .supported_hw = &version,
         |                                 ^
   drivers/cpufreq/ti-cpufreq.c:331:33: note: (near initialization for 'config.supported_hw')
>> drivers/cpufreq/ti-cpufreq.c:374:17: error: label 'fail_put_node' used but not defined
     374 |                 goto fail_put_node;
         |                 ^~~~
   cc1: some warnings being treated as errors


vim +331 drivers/cpufreq/ti-cpufreq.c

   322	
   323	static int ti_cpufreq_probe(struct platform_device *pdev)
   324	{
   325		u32 version[VERSION_COUNT];
   326		const struct of_device_id *match;
   327		struct ti_cpufreq_data *opp_data;
   328		const char * const default_reg_names[] = {"vdd", "vbb"};
   329		int ret;
   330		struct dev_pm_opp_config config = {
 > 331			.supported_hw = &version,
   332			.supported_hw_count = ARRAY_SIZE(version),
   333		};
   334	
   335		match = dev_get_platdata(&pdev->dev);
   336		if (!match)
   337			return -ENODEV;
   338	
   339		opp_data = devm_kzalloc(&pdev->dev, sizeof(*opp_data), GFP_KERNEL);
   340		if (!opp_data)
   341			return -ENOMEM;
   342	
   343		opp_data->soc_data = match->data;
   344	
   345		opp_data->cpu_dev = get_cpu_device(0);
   346		if (!opp_data->cpu_dev) {
   347			pr_err("%s: Failed to get device for CPU0\n", __func__);
   348			return -ENODEV;
   349		}
   350	
   351		opp_data->opp_node = dev_pm_opp_of_get_opp_desc_node(opp_data->cpu_dev);
   352		if (!opp_data->opp_node) {
   353			dev_info(opp_data->cpu_dev,
   354				 "OPP-v2 not supported, cpufreq-dt will attempt to use legacy tables.\n");
   355			goto register_cpufreq_dt;
   356		}
   357	
   358		ret = ti_cpufreq_setup_syscon_register(opp_data);
   359		if (ret)
   360			goto fail_put_node;
   361	
   362		/*
   363		 * OPPs determine whether or not they are supported based on
   364		 * two metrics:
   365		 *	0 - SoC Revision
   366		 *	1 - eFuse value
   367		 */
   368		ret = ti_cpufreq_get_rev(opp_data, &version[0]);
   369		if (ret)
   370			goto fail_put_node;
   371	
   372		ret = ti_cpufreq_get_efuse(opp_data, &version[1]);
   373		if (ret)
 > 374			goto fail_put_node;
   375	
   376		if (opp_data->soc_data->multi_regulator) {
   377			config.regulator_count = ARRAY_SIZE(default_reg_names);
   378	
   379			if (opp_data->soc_data->reg_names)
   380				config.regulator_names = opp_data->soc_data->reg_names;
   381			else
   382				config.regulator_names = default_reg_names;
   383		}
   384	
   385		opp_data->opp_table = dev_pm_opp_set_config(opp_data->cpu_dev, &config);
   386		of_node_put(opp_data->opp_node);
   387	
   388		if (IS_ERR(opp_data->opp_table)) {
   389			dev_err(opp_data->cpu_dev, "Failed to set OPP config\n");
   390			return PTR_ERR(opp_data->opp_table);
   391		}
   392	
   393	register_cpufreq_dt:
   394		platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
   395	
   396		return 0;
   397	}
   398	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-25 19:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-25 19:34 [vireshk-pm:opp/config 17/33] drivers/cpufreq/ti-cpufreq.c:331:33: error: initialization of 'const u32 *' {aka 'const unsigned int *'} from incompatible pointer type 'u32 (*)[2]' {aka 'unsigned int (*)[2]'} kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).