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  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:   Wed, 15 Sep 2021 23:27:40 +0800
From:   kernel test robot <lkp@...el.com>
To:     Saravana Kannan <skannan@...eaurora.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Chanwoo Choi <cw00.choi@...sung.com>,
        Sibi Sankar <sibis@...eaurora.org>
Subject: [chanwoo:devfreq-testing 2/4]
 drivers/devfreq/governor_passive.c:255:9: error: implicit declaration of
 function 'get_online_cpus'; did you mean 'get_online_mems'?

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git devfreq-testing
head:   c27162469a5f04fd237debefc710d28956b9704e
commit: 0e153a22371583fa454d9f54a828bbcb81c074c4 [2/4] PM / devfreq: Add cpu based scaling support to passive governor
config: nios2-allyesconfig (attached as .config)
compiler: nios2-linux-gcc (GCC) 11.2.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/chanwoo/linux.git/commit/?id=0e153a22371583fa454d9f54a828bbcb81c074c4
        git remote add chanwoo https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git
        git fetch --no-tags chanwoo devfreq-testing
        git checkout 0e153a22371583fa454d9f54a828bbcb81c074c4
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=nios2 

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

All errors (new ones prefixed by >>):

   drivers/devfreq/governor_passive.c: In function 'cpufreq_passive_register_notifier':
>> drivers/devfreq/governor_passive.c:255:9: error: implicit declaration of function 'get_online_cpus'; did you mean 'get_online_mems'? [-Werror=implicit-function-declaration]
     255 |         get_online_cpus();
         |         ^~~~~~~~~~~~~~~
         |         get_online_mems
>> drivers/devfreq/governor_passive.c:305:9: error: implicit declaration of function 'put_online_cpus'; did you mean 'num_online_cpus'? [-Werror=implicit-function-declaration]
     305 |         put_online_cpus();
         |         ^~~~~~~~~~~~~~~
         |         num_online_cpus
   cc1: all warnings being treated as errors


vim +255 drivers/devfreq/governor_passive.c

   242	
   243	static int cpufreq_passive_register_notifier(struct devfreq *devfreq)
   244	{
   245		struct devfreq_passive_data *p_data
   246				= (struct devfreq_passive_data *)devfreq->data;
   247		struct device *dev = devfreq->dev.parent;
   248		struct opp_table *opp_table = NULL;
   249		struct devfreq_cpu_data *cpu_data;
   250		struct cpufreq_policy *policy;
   251		struct device *cpu_dev;
   252		unsigned int cpu;
   253		int ret;
   254	
 > 255		get_online_cpus();
   256	
   257		p_data->nb.notifier_call = cpufreq_passive_notifier_call;
   258		ret = cpufreq_register_notifier(&p_data->nb, CPUFREQ_TRANSITION_NOTIFIER);
   259		if (ret) {
   260			dev_err(dev, "failed to register cpufreq notifier\n");
   261			p_data->nb.notifier_call = NULL;
   262			goto out;
   263		}
   264	
   265		for_each_online_cpu(cpu) {
   266			if (p_data->cpu_data[cpu])
   267				continue;
   268	
   269			policy = cpufreq_cpu_get(cpu);
   270			if (policy) {
   271				cpu_data = kzalloc(sizeof(*cpu_data), GFP_KERNEL);
   272				if (!cpu_data) {
   273					ret = -ENOMEM;
   274					goto out;
   275				}
   276	
   277				cpu_dev = get_cpu_device(cpu);
   278				if (!cpu_dev) {
   279					dev_err(dev, "failed to get cpu device\n");
   280					ret = -ENODEV;
   281					goto out;
   282				}
   283	
   284				opp_table = dev_pm_opp_get_opp_table(cpu_dev);
   285				if (IS_ERR(opp_table)) {
   286					ret = PTR_ERR(opp_table);
   287					goto out;
   288				}
   289	
   290				cpu_data->dev = cpu_dev;
   291				cpu_data->opp_table = opp_table;
   292				cpu_data->first_cpu = cpumask_first(policy->related_cpus);
   293				cpu_data->cur_freq = policy->cur;
   294				cpu_data->min_freq = policy->cpuinfo.min_freq;
   295				cpu_data->max_freq = policy->cpuinfo.max_freq;
   296	
   297				p_data->cpu_data[cpu] = cpu_data;
   298				cpufreq_cpu_put(policy);
   299			} else {
   300				ret = -EPROBE_DEFER;
   301				goto out;
   302			}
   303		}
   304	out:
 > 305		put_online_cpus();
   306		if (ret)
   307			return ret;
   308	
   309		mutex_lock(&devfreq->lock);
   310		ret = devfreq_update_target(devfreq, 0L);
   311		mutex_unlock(&devfreq->lock);
   312		if (ret)
   313			dev_err(dev, "failed to update the frequency\n");
   314	
   315		return ret;
   316	}
   317	

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

Download attachment ".config.gz" of type "application/gzip" (60767 bytes)

Powered by blists - more mailing lists