* [jarkko-tpmdd:sgx-cgroups-v9 3/21] kernel/cgroup/misc.c:446:25: warning: variable 'parent_cg' set but not used
@ 2024-03-28 16:26 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-03-28 16:26 UTC (permalink / raw)
To: Kristen Carlson Accardi
Cc: oe-kbuild-all, Jarkko Sakkinen, Haitao Huang, Tejun Heo
tree: git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git sgx-cgroups-v9
head: c9feec6d07a914300bfbb5eab86ad3222945f631
commit: e9af4921b9f22706e997afcc7a371a7bbeb69da6 [3/21] cgroup/misc: Add per resource callbacks for CSS events
config: openrisc-allmodconfig (https://download.01.org/0day-ci/archive/20240329/202403290053.FqcY10bG-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240329/202403290053.FqcY10bG-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202403290053.FqcY10bG-lkp@intel.com/
All warnings (new ones prefixed by >>):
kernel/cgroup/misc.c: In function 'misc_cg_alloc':
>> kernel/cgroup/misc.c:446:25: warning: variable 'parent_cg' set but not used [-Wunused-but-set-variable]
446 | struct misc_cg *parent_cg, *cg;
| ^~~~~~~~~
vim +/parent_cg +446 kernel/cgroup/misc.c
433
434 /**
435 * misc_cg_alloc() - Allocate misc cgroup.
436 * @parent_css: Parent cgroup.
437 *
438 * Context: Process context.
439 * Return:
440 * * struct cgroup_subsys_state* - css of the allocated cgroup.
441 * * ERR_PTR(-ENOMEM) - No memory available to allocate.
442 */
443 static struct cgroup_subsys_state *
444 misc_cg_alloc(struct cgroup_subsys_state *parent_css)
445 {
> 446 struct misc_cg *parent_cg, *cg;
447 int ret;
448
449 if (unlikely(!parent_css)) {
450 parent_cg = cg = &root_cg;
451 } else {
452 cg = kzalloc(sizeof(*cg), GFP_KERNEL);
453 if (!cg)
454 return ERR_PTR(-ENOMEM);
455 parent_cg = css_misc(parent_css);
456 }
457
458 ret = _misc_cg_res_alloc(cg);
459 if (ret) {
460 _misc_cg_res_free(cg);
461 if (likely(parent_css))
462 kfree(cg);
463
464 return ERR_PTR(ret);
465 }
466
467 return &cg->css;
468 }
469
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-03-28 16:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-28 16:26 [jarkko-tpmdd:sgx-cgroups-v9 3/21] kernel/cgroup/misc.c:446:25: warning: variable 'parent_cg' set but not used kernel test robot
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.