[tj-cgroup:test 23/31] kernel/cgroup/cpuset-v1.c:163:2: error: call to undeclared function 'cpus_read_lock'; ISO C99 and later do not support implicit function declarations

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git test
head:   a5ab7b05a3c825f23d74106f3304de7d024cff8a
commit: dd46bd00ab4c00f6126794c6b52fbc87a2c5c389 [23/31] cgroup/cpuset: move relax_domain_level to cpuset-v1.c
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20240831/202408311651.vwwxEpKn-lkp@xxxxxxxxx/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 46fe36a4295f05d5d3731762e31fc4e6e99863e9)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240831/202408311651.vwwxEpKn-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408311651.vwwxEpKn-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   In file included from kernel/cgroup/cpuset-v1.c:3:
   In file included from kernel/cgroup/cpuset-internal.h:9:
   In file included from include/linux/cpuset.h:17:
   In file included from include/linux/mm.h:2228:
   include/linux/vmstat.h:500:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     500 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     501 |                            item];
         |                            ~~~~
   include/linux/vmstat.h:507:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     507 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     508 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     514 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   include/linux/vmstat.h:519:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     519 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     520 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:528:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     528 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     529 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
>> kernel/cgroup/cpuset-v1.c:163:2: error: call to undeclared function 'cpus_read_lock'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     163 |         cpus_read_lock();
         |         ^
   kernel/cgroup/cpuset-v1.c:163:2: note: did you mean 'rcu_read_lock'?
   include/linux/rcupdate.h:834:29: note: 'rcu_read_lock' declared here
     834 | static __always_inline void rcu_read_lock(void)
         |                             ^
>> kernel/cgroup/cpuset-v1.c:178:2: error: call to undeclared function 'cpus_read_unlock'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     178 |         cpus_read_unlock();
         |         ^
   5 warnings and 2 errors generated.


vim +/cpus_read_lock +163 kernel/cgroup/cpuset-v1.c

   155	
   156	int cpuset_write_s64(struct cgroup_subsys_state *css, struct cftype *cft,
   157				    s64 val)
   158	{
   159		struct cpuset *cs = css_cs(css);
   160		cpuset_filetype_t type = cft->private;
   161		int retval = -ENODEV;
   162	
 > 163		cpus_read_lock();
   164		cpuset_lock();
   165		if (!is_cpuset_online(cs))
   166			goto out_unlock;
   167	
   168		switch (type) {
   169		case FILE_SCHED_RELAX_DOMAIN_LEVEL:
   170			retval = update_relax_domain_level(cs, val);
   171			break;
   172		default:
   173			retval = -EINVAL;
   174			break;
   175		}
   176	out_unlock:
   177		cpuset_unlock();
 > 178		cpus_read_unlock();
   179		return retval;
   180	}
   181	

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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux