lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Thu, 26 May 2022 02:03:16 +0800
From:   kernel test robot <lkp@...el.com>
To:     Viresh Kumar <viresh.kumar@...aro.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [vireshk-pm:opp/config 14/33] drivers/cpufreq/sti-cpufreq.c:163:33:
 error: initialization of 'const u32 *' {aka 'const unsigned int *'} from
 incompatible pointer type 'unsigned int (*)[3]'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git opp/config
head:   d730dc101c586defb49eeafd8eea9b7bb0baa01b
commit: fde02a60d6932a408e7330eb5887de842eae2dbb [14/33] cpufreq: sti: Migrate to dev_pm_opp_set_config()
config: arm-allmodconfig (https://download.01.org/0day-ci/archive/20220526/202205260212.nwth1TXT-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=fde02a60d6932a408e7330eb5887de842eae2dbb
        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 fde02a60d6932a408e7330eb5887de842eae2dbb
        # 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@...el.com>

All errors (new ones prefixed by >>):

   drivers/cpufreq/sti-cpufreq.c: In function 'sti_cpufreq_set_opp_info':
>> drivers/cpufreq/sti-cpufreq.c:163:33: error: initialization of 'const u32 *' {aka 'const unsigned int *'} from incompatible pointer type 'unsigned int (*)[3]' [-Werror=incompatible-pointer-types]
     163 |                 .supported_hw = &version,
         |                                 ^
   drivers/cpufreq/sti-cpufreq.c:163:33: note: (near initialization for 'config.supported_hw')
   cc1: some warnings being treated as errors


vim +163 drivers/cpufreq/sti-cpufreq.c

   150	
   151	static int sti_cpufreq_set_opp_info(void)
   152	{
   153		struct device *dev = ddata.cpu;
   154		struct device_node *np = dev->of_node;
   155		const struct reg_field *reg_fields;
   156		unsigned int hw_info_offset;
   157		unsigned int version[VERSION_ELEMENTS];
   158		int pcode, substrate, major, minor;
   159		int ret;
   160		char name[MAX_PCODE_NAME_LEN];
   161		struct opp_table *opp_table;
   162		struct dev_pm_opp_config config = {
 > 163			.supported_hw = &version,
   164			.supported_hw_count = ARRAY_SIZE(version),
   165			.prop_name = name,
   166		};
   167	
   168		reg_fields = sti_cpufreq_match();
   169		if (!reg_fields) {
   170			dev_err(dev, "This SoC doesn't support voltage scaling\n");
   171			return -ENODEV;
   172		}
   173	
   174		ret = of_property_read_u32_index(np, "st,syscfg-eng",
   175						 HW_INFO_INDEX, &hw_info_offset);
   176		if (ret) {
   177			dev_warn(dev, "Failed to read HW info offset from DT\n");
   178			substrate = DEFAULT_VERSION;
   179			pcode = 0;
   180			goto use_defaults;
   181		}
   182	
   183		pcode = sti_cpufreq_fetch_regmap_field(reg_fields,
   184						       hw_info_offset,
   185						       PCODE);
   186		if (pcode < 0) {
   187			dev_warn(dev, "Failed to obtain process code\n");
   188			/* Use default pcode */
   189			pcode = 0;
   190		}
   191	
   192		substrate = sti_cpufreq_fetch_regmap_field(reg_fields,
   193							   hw_info_offset,
   194							   SUBSTRATE);
   195		if (substrate) {
   196			dev_warn(dev, "Failed to obtain substrate code\n");
   197			/* Use default substrate */
   198			substrate = DEFAULT_VERSION;
   199		}
   200	
   201	use_defaults:
   202		major = sti_cpufreq_fetch_major();
   203		if (major < 0) {
   204			dev_err(dev, "Failed to obtain major version\n");
   205			/* Use default major number */
   206			major = DEFAULT_VERSION;
   207		}
   208	
   209		minor = sti_cpufreq_fetch_minor();
   210		if (minor < 0) {
   211			dev_err(dev, "Failed to obtain minor version\n");
   212			/* Use default minor number */
   213			minor = DEFAULT_VERSION;
   214		}
   215	
   216		snprintf(name, MAX_PCODE_NAME_LEN, "pcode%d", pcode);
   217	
   218		version[0] = BIT(major);
   219		version[1] = BIT(minor);
   220		version[2] = BIT(substrate);
   221	
   222		opp_table = dev_pm_opp_set_config(dev, &config);
   223		if (IS_ERR(opp_table)) {
   224			dev_err(dev, "Failed to set OPP config\n");
   225			return PTR_ERR(opp_table);
   226		}
   227	
   228		dev_dbg(dev, "pcode: %d major: %d minor: %d substrate: %d\n",
   229			pcode, major, minor, substrate);
   230		dev_dbg(dev, "version[0]: %x version[1]: %x version[2]: %x\n",
   231			version[0], version[1], version[2]);
   232	
   233		return 0;
   234	}
   235	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ