Hi Waiman,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on cgroup/for-next]
[also build test ERROR on v4.19-rc7 next-20181012]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:    
https://github.com/0day-ci/linux/commits/Waiman-Long/cpuset-Enable-cpuset-controller-in-default-hierarchy/20181013-213352
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git for-next
config: i386-randconfig-x078-201840 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   kernel/cgroup/cpuset.c: In function 'update_cpumask':
>> kernel/cgroup/cpuset.c:1293:15: error: assignment to expression with array 
>> type
     tmp.addmask  = trialcs->subparts_cpus;
                  ^
   kernel/cgroup/cpuset.c:1294:15: error: assignment to expression with array 
type
     tmp.delmask  = trialcs->effective_cpus;
                  ^
   kernel/cgroup/cpuset.c:1295:15: error: assignment to expression with array 
type
     tmp.new_cpus = trialcs->cpus_allowed;
                  ^

vim +1293 kernel/cgroup/cpuset.c

  1247  
  1248  /**
  1249   * update_cpumask - update the cpus_allowed mask of a cpuset and all 
tasks in it
  1250   * @cs: the cpuset to consider
  1251   * @trialcs: trial cpuset
  1252   * @buf: buffer of cpu numbers written to this cpuset
  1253   */
  1254  static int update_cpumask(struct cpuset *cs, struct cpuset *trialcs,
  1255                            const char *buf)
  1256  {
  1257          int retval;
  1258          struct tmpmasks tmp;
  1259  
  1260          /* top_cpuset.cpus_allowed tracks cpu_online_mask; it's 
read-only */
  1261          if (cs == &top_cpuset)
  1262                  return -EACCES;
  1263  
  1264          /*
  1265           * An empty cpus_allowed is ok only if the cpuset has no tasks.
  1266           * Since cpulist_parse() fails on an empty mask, we special case
  1267           * that parsing.  The validate_change() call ensures that 
cpusets
  1268           * with tasks have cpus.
  1269           */
  1270          if (!*buf) {
  1271                  cpumask_clear(trialcs->cpus_allowed);
  1272          } else {
  1273                  retval = cpulist_parse(buf, trialcs->cpus_allowed);
  1274                  if (retval < 0)
  1275                          return retval;
  1276  
  1277                  if (!cpumask_subset(trialcs->cpus_allowed,
  1278                                      top_cpuset.cpus_allowed))
  1279                          return -EINVAL;
  1280          }
  1281  
  1282          /* Nothing to do if the cpus didn't change */
  1283          if (cpumask_equal(cs->cpus_allowed, trialcs->cpus_allowed))
  1284                  return 0;
  1285  
  1286          retval = validate_change(cs, trialcs);
  1287          if (retval < 0)
  1288                  return retval;
  1289  
  1290          /*
  1291           * Use the cpumasks in trialcs for tmpmasks.
  1292           */
> 1293          tmp.addmask  = trialcs->subparts_cpus;
  1294          tmp.delmask  = trialcs->effective_cpus;
  1295          tmp.new_cpus = trialcs->cpus_allowed;
  1296  
  1297          if (cs->partition_root_state) {
  1298                  /* Cpumask of a partition root cannot be empty */
  1299                  if (cpumask_empty(trialcs->cpus_allowed))
  1300                          return -EINVAL;
  1301                  if (update_parent_subparts_cpumask(cs, partcmd_update,
  1302                                          trialcs->cpus_allowed, &tmp) < 
0)
  1303                          return -EINVAL;
  1304          }
  1305  
  1306          spin_lock_irq(&callback_lock);
  1307          cpumask_copy(cs->cpus_allowed, trialcs->cpus_allowed);
  1308  
  1309          /*
  1310           * Make sure that subparts_cpus is a subset of cpus_allowed.
  1311           */
  1312          if (cs->nr_subparts_cpus) {
  1313                  cpumask_andnot(cs->subparts_cpus, cs->subparts_cpus,
  1314                                 cs->cpus_allowed);
  1315                  cs->nr_subparts_cpus = 
cpumask_weight(cs->subparts_cpus);
  1316          }
  1317          spin_unlock_irq(&callback_lock);
  1318  
  1319          update_cpumasks_hier(cs, &tmp);
  1320          return 0;
  1321  }
  1322  

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

Reply via email to