From: kernel test robot <lkp@intel.com>
To: Kees Cook <keescook@chromium.org>, Tejun Heo <tj@kernel.org>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
Kees Cook <keescook@chromium.org>,
Zefan Li <lizefan.x@bytedance.com>,
Johannes Weiner <hannes@cmpxchg.org>,
cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-hardening@vger.kernel.org
Subject: Re: [PATCH] cgroup: Avoid compiler warnings with no subsystems
Date: Fri, 27 Aug 2021 15:21:35 +0800 [thread overview]
Message-ID: <202108271524.oOIHtG9S-lkp@intel.com> (raw)
In-Reply-To: <20210827034741.2214318-1-keescook@chromium.org>
[-- Attachment #1: Type: text/plain, Size: 3566 bytes --]
Hi Kees,
I love your patch! Perhaps something to improve:
[auto build test WARNING on cgroup/for-next]
[also build test WARNING on kees/for-next/pstore v5.14-rc7 next-20210826]
[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/Kees-Cook/cgroup-Avoid-compiler-warnings-with-no-subsystems/20210827-115012
base: https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git for-next
config: arm64-buildonly-randconfig-r005-20210827 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 1076082a0d97bd5c16a25ee7cf3dbb6ee4b5a9fe)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/0day-ci/linux/commit/3e93974a5c6d03c5444c3acbaf67061d0897fb96
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Kees-Cook/cgroup-Avoid-compiler-warnings-with-no-subsystems/20210827-115012
git checkout 3e93974a5c6d03c5444c3acbaf67061d0897fb96
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
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 >>):
>> kernel/cgroup/cgroup.c:475:26: warning: converting the enum constant to a boolean [-Wint-in-bool-context]
if (CGROUP_SUBSYS_COUNT && ss)
^
kernel/cgroup/cgroup.c:656:26: warning: converting the enum constant to a boolean [-Wint-in-bool-context]
if (CGROUP_SUBSYS_COUNT && cft->ss)
^
kernel/cgroup/cgroup.c:2381:29: warning: converting the enum constant to a boolean [-Wint-in-bool-context]
while (CGROUP_SUBSYS_COUNT && &cset->mg_node != tset->csets) {
^
kernel/cgroup/cgroup.c:4652:26: warning: converting the enum constant to a boolean [-Wint-in-bool-context]
if (CGROUP_SUBSYS_COUNT && it->ss)
^
4 warnings generated.
vim +475 kernel/cgroup/cgroup.c
460
461 /**
462 * cgroup_css - obtain a cgroup's css for the specified subsystem
463 * @cgrp: the cgroup of interest
464 * @ss: the subsystem of interest (%NULL returns @cgrp->self)
465 *
466 * Return @cgrp's css (cgroup_subsys_state) associated with @ss. This
467 * function must be called either under cgroup_mutex or rcu_read_lock() and
468 * the caller is responsible for pinning the returned css if it wants to
469 * keep accessing it outside the said locks. This function may return
470 * %NULL if @cgrp doesn't have @subsys_id enabled.
471 */
472 static struct cgroup_subsys_state *cgroup_css(struct cgroup *cgrp,
473 struct cgroup_subsys *ss)
474 {
> 475 if (CGROUP_SUBSYS_COUNT && ss)
476 return rcu_dereference_check(cgrp->subsys[ss->id],
477 lockdep_is_held(&cgroup_mutex));
478 else
479 return &cgrp->self;
480 }
481
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 44884 bytes --]
prev parent reply other threads:[~2021-08-27 7:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-27 3:47 Kees Cook
2021-08-27 7:21 ` kernel test robot [this message]
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=202108271524.oOIHtG9S-lkp@intel.com \
--to=lkp@intel.com \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=kbuild-all@lists.01.org \
--cc=keescook@chromium.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan.x@bytedance.com \
--cc=llvm@lists.linux.dev \
--cc=tj@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®