All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [RFC] cpuidle : Add support for pseudo-cpuidle driver
Date: Fri, 24 Jul 2020 11:41:42 +0800	[thread overview]
Message-ID: <202007241103.8IPJT55n%lkp@intel.com> (raw)
In-Reply-To: <20200723061339.9747-1-huntbag@linux.vnet.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 8620 bytes --]

Hi Abhishek,

[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on pm/linux-next]
[also build test WARNING on linux/master linus/master v5.8-rc6 next-20200723]
[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/Abhishek-Goel/cpuidle-Add-support-for-pseudo-cpuidle-driver/20200723-141912
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: x86_64-randconfig-a014-20200723 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project e0ee2288424952e0445f096ae7800472eac11249)
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
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

>> drivers/cpuidle/cpuidle-test.c:118:5: warning: no previous prototype for function 'cpuidle_cpu_online' [-Wmissing-prototypes]
   int cpuidle_cpu_online(unsigned int cpu)
       ^
   drivers/cpuidle/cpuidle-test.c:118:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int cpuidle_cpu_online(unsigned int cpu)
   ^
   static 
>> drivers/cpuidle/cpuidle-test.c:134:5: warning: no previous prototype for function 'cpuidle_cpu_dead' [-Wmissing-prototypes]
   int cpuidle_cpu_dead(unsigned int cpu)
       ^
   drivers/cpuidle/cpuidle-test.c:134:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int cpuidle_cpu_dead(unsigned int cpu)
   ^
   static 
>> drivers/cpuidle/cpuidle-test.c:145:5: warning: no previous prototype for function 'cpuidle_driver_init' [-Wmissing-prototypes]
   int cpuidle_driver_init(void)
       ^
   drivers/cpuidle/cpuidle-test.c:145:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int cpuidle_driver_init(void)
   ^
   static 
>> drivers/cpuidle/cpuidle-test.c:166:5: warning: no previous prototype for function 'add_cpuidle_states' [-Wmissing-prototypes]
   int add_cpuidle_states(void)
       ^
   drivers/cpuidle/cpuidle-test.c:166:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int add_cpuidle_states(void)
   ^
   static 
>> drivers/cpuidle/cpuidle-test.c:223:6: warning: no previous prototype for function 'test_cpuidle_uninit' [-Wmissing-prototypes]
   void test_cpuidle_uninit(void)
        ^
   drivers/cpuidle/cpuidle-test.c:223:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void test_cpuidle_uninit(void)
   ^
   static 
>> drivers/cpuidle/cpuidle-test.c:233:12: warning: no previous prototype for function 'test_cpuidle_init' [-Wmissing-prototypes]
   int __init test_cpuidle_init(void)
              ^
   drivers/cpuidle/cpuidle-test.c:233:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int __init test_cpuidle_init(void)
   ^
   static 
>> drivers/cpuidle/cpuidle-test.c:266:13: warning: no previous prototype for function 'test_cpuidle_exit' [-Wmissing-prototypes]
   void __exit test_cpuidle_exit(void)
               ^
   drivers/cpuidle/cpuidle-test.c:266:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void __exit test_cpuidle_exit(void)
   ^
   static 
   7 warnings generated.

vim +/cpuidle_cpu_online +118 drivers/cpuidle/cpuidle-test.c

   117	
 > 118	int cpuidle_cpu_online(unsigned int cpu)
   119	{
   120		struct cpuidle_device *dev;
   121	
   122		dev = per_cpu_ptr(test_cpuidle_devices, cpu);
   123		if (!dev->registered) {
   124			dev->cpu = cpu;
   125			if (cpuidle_register_device(dev)) {
   126				pr_notice("cpuidle_register_device %d failed!\n", cpu);
   127				return -EIO;
   128			}
   129		}
   130	
   131		return 0;
   132	}
   133	
 > 134	int cpuidle_cpu_dead(unsigned int cpu)
   135	{
   136		struct cpuidle_device *dev;
   137	
   138		dev = per_cpu_ptr(test_cpuidle_devices, cpu);
   139		if (dev->registered)
   140			cpuidle_unregister_device(dev);
   141	
   142		return 0;
   143	}
   144	
 > 145	int cpuidle_driver_init(void)
   146	{
   147		int idle_state;
   148		struct cpuidle_driver *drv = &test_cpuidle_driver;
   149	
   150		drv->state_count = 0;
   151	
   152		for (idle_state = 0; idle_state < nr_states; ++idle_state) {
   153			/* Is the state not enabled? */
   154			if (cpuidle_state_table[idle_state].enter == NULL)
   155				continue;
   156	
   157			drv->states[drv->state_count] =	/* structure copy */
   158				cpuidle_state_table[idle_state];
   159	
   160			drv->state_count += 1;
   161		}
   162	
   163		return 0;
   164	}
   165	
 > 166	int add_cpuidle_states(void)
   167	{
   168		/* Parse the module param and initialize the idle states here
   169		 * in cpuidle_state_table.
   170		 */
   171		char *this_param;
   172		char *input_name = name;
   173		char *input_res = residency_us;
   174		char *input_lat = latency_us;
   175		int index = 1;
   176		long temp;
   177		int rc;
   178	
   179		switch (sim_type) {
   180		case 1:
   181			cpuidle_state_table = cpuidle_states_ppc;
   182			return 0;
   183		case 2:
   184			cpuidle_state_table = cpuidle_states_intel;
   185			return 0;
   186		case 3:
   187			break;
   188		default:
   189			pr_warn("Sim value out of bound\n");
   190			break;
   191		}
   192	
   193		if (strnlen(input_name, MAX_PARAM_LENGTH)) {
   194			while ((this_param = strsep(&input_name, ",")) && index <= nr_states) {
   195				strcpy(cpuidle_states[index].name, this_param);
   196				cpuidle_states[index].enter = idle_loop;
   197				index++;
   198			}
   199		}
   200	
   201		if (strnlen(input_res, MAX_PARAM_LENGTH)) {
   202			index = 1;
   203			while ((this_param = strsep(&input_res, ",")) && index <= nr_states) {
   204				rc = kstrtol(this_param, 10, &temp);
   205				cpuidle_states[index].target_residency = temp;
   206				index++;
   207			}
   208		}
   209	
   210		if (strnlen(input_lat, MAX_PARAM_LENGTH)) {
   211			index = 1;
   212			while ((this_param = strsep(&input_lat, ",")) && index <= nr_states) {
   213				rc = kstrtol(this_param, 10, &temp);
   214				cpuidle_states[index].exit_latency = temp;
   215				index++;
   216			}
   217		}
   218	
   219		cpuidle_state_table = cpuidle_states;
   220		return nr_states;
   221	}
   222	
 > 223	void test_cpuidle_uninit(void)
   224	{
   225		if (test_hp_idlestate)
   226			cpuhp_remove_state(test_hp_idlestate);
   227		cpuidle_unregister_driver(&test_cpuidle_driver);
   228	
   229		free_percpu(test_cpuidle_devices);
   230		test_cpuidle_devices = NULL;
   231	}
   232	
 > 233	int __init test_cpuidle_init(void)
   234	{
   235		int retval;
   236	
   237		add_cpuidle_states();
   238		cpuidle_driver_init();
   239		retval = cpuidle_register(&test_cpuidle_driver, NULL);
   240		if (retval) {
   241			printk(KERN_DEBUG "Registration of test driver failed.\n");
   242			return retval;
   243		}
   244	
   245		test_cpuidle_devices = alloc_percpu(struct cpuidle_device);
   246		if (test_cpuidle_devices == NULL) {
   247			cpuidle_unregister_driver(&test_cpuidle_driver);
   248			return -ENOMEM;
   249		}
   250	
   251		retval = cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN,
   252						   "cpuidle/powernv:online",
   253						   cpuidle_cpu_online,
   254						   cpuidle_cpu_dead);
   255	
   256		if (retval < 0) {
   257			test_cpuidle_uninit();
   258		} else {
   259			test_hp_idlestate = retval;
   260			retval = 0;
   261		}
   262	
   263		return retval;
   264	}
   265	
 > 266	void __exit test_cpuidle_exit(void)
   267	{
   268		test_cpuidle_uninit();
   269	}
   270	

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35928 bytes --]

  parent reply	other threads:[~2020-07-24  3:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-23  6:13 [RFC] cpuidle : Add support for pseudo-cpuidle driver Abhishek Goel
2020-07-23  6:24 ` Randy Dunlap
2020-07-24  3:40 ` kernel test robot
2020-07-24  3:40 ` [RFC PATCH] cpuidle : cpuidle_cpu_online() can be static kernel test robot
2020-07-24  3:41 ` kernel test robot [this message]
2020-07-24 10:51 ` [RFC] cpuidle : Add support for pseudo-cpuidle driver kernel test robot
2020-08-05 11:56 ` Dan Carpenter
2020-08-05 11:56   ` Dan Carpenter
2020-08-20 19:33 ` Fontenot, Nathan
  -- strict thread matches above, loose matches on Subject: below --
2020-08-01  8:30 kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202007241103.8IPJT55n%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.