llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [cel:nfsv3-xdrgen 41/55] fs/nfsd/nfs3xdr_gen.c:194:2: warning: switch condition has boolean value
Date: Mon, 17 Nov 2025 23:52:55 +0800	[thread overview]
Message-ID: <202511172336.Y75zj4v6-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux nfsv3-xdrgen
head:   6158ace3b663c4e9ab201f2cc644f4290fa30905
commit: 2b5b97ec0f7a484e81bedf71e223f38b0feb98ca [41/55] Documentation: Add the RPC language description of NFSv3
config: arm-footbridge_defconfig (https://download.01.org/0day-ci/archive/20251117/202511172336.Y75zj4v6-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251117/202511172336.Y75zj4v6-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/202511172336.Y75zj4v6-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> fs/nfsd/nfs3xdr_gen.c:194:2: warning: switch condition has boolean value [-Wswitch-bool]
     194 |         switch (ptr->attributes_follow) {
         |         ^       ~~~~~~~~~~~~~~~~~~~~~~
   fs/nfsd/nfs3xdr_gen.c:220:2: warning: switch condition has boolean value [-Wswitch-bool]
     220 |         switch (ptr->attributes_follow) {
         |         ^       ~~~~~~~~~~~~~~~~~~~~~~
   fs/nfsd/nfs3xdr_gen.c:244:2: warning: switch condition has boolean value [-Wswitch-bool]
     244 |         switch (ptr->handle_follows) {
         |         ^       ~~~~~~~~~~~~~~~~~~~
   fs/nfsd/nfs3xdr_gen.c:269:2: warning: switch condition has boolean value [-Wswitch-bool]
     269 |         switch (ptr->set_it) {
         |         ^       ~~~~~~~~~~~
   fs/nfsd/nfs3xdr_gen.c:285:2: warning: switch condition has boolean value [-Wswitch-bool]
     285 |         switch (ptr->set_it) {
         |         ^       ~~~~~~~~~~~
   fs/nfsd/nfs3xdr_gen.c:301:2: warning: switch condition has boolean value [-Wswitch-bool]
     301 |         switch (ptr->set_it) {
         |         ^       ~~~~~~~~~~~
   fs/nfsd/nfs3xdr_gen.c:317:2: warning: switch condition has boolean value [-Wswitch-bool]
     317 |         switch (ptr->set_it) {
         |         ^       ~~~~~~~~~~~
   fs/nfsd/nfs3xdr_gen.c:425:2: warning: switch condition has boolean value [-Wswitch-bool]
     425 |         switch (ptr->check) {
         |         ^       ~~~~~~~~~~
   fs/nfsd/nfs3xdr_gen.c:2080:2: warning: switch condition has boolean value [-Wswitch-bool]
    2080 |         switch (ptr->attributes_follow) {
         |         ^       ~~~~~~~~~~~~~~~~~~~~~~
   fs/nfsd/nfs3xdr_gen.c:2106:2: warning: switch condition has boolean value [-Wswitch-bool]
    2106 |         switch (ptr->attributes_follow) {
         |         ^       ~~~~~~~~~~~~~~~~~~~~~~
   fs/nfsd/nfs3xdr_gen.c:2130:2: warning: switch condition has boolean value [-Wswitch-bool]
    2130 |         switch (ptr->handle_follows) {
         |         ^       ~~~~~~~~~~~~~~~~~~~
   fs/nfsd/nfs3xdr_gen.c:2150:2: warning: switch condition has boolean value [-Wswitch-bool]
    2150 |         switch (ptr->set_it) {
         |         ^       ~~~~~~~~~~~
   fs/nfsd/nfs3xdr_gen.c:2166:2: warning: switch condition has boolean value [-Wswitch-bool]
    2166 |         switch (ptr->set_it) {
         |         ^       ~~~~~~~~~~~
   fs/nfsd/nfs3xdr_gen.c:2182:2: warning: switch condition has boolean value [-Wswitch-bool]
    2182 |         switch (ptr->set_it) {
         |         ^       ~~~~~~~~~~~
   fs/nfsd/nfs3xdr_gen.c:2198:2: warning: switch condition has boolean value [-Wswitch-bool]
    2198 |         switch (ptr->set_it) {
         |         ^       ~~~~~~~~~~~
   fs/nfsd/nfs3xdr_gen.c:2306:2: warning: switch condition has boolean value [-Wswitch-bool]
    2306 |         switch (ptr->check) {
         |         ^       ~~~~~~~~~~
   16 warnings generated.


vim +194 fs/nfsd/nfs3xdr_gen.c

   188	
   189	static bool __maybe_unused
   190	xdrgen_decode_post_op_attr(struct xdr_stream *xdr, struct post_op_attr *ptr)
   191	{
   192		if (!xdrgen_decode_bool(xdr, &ptr->attributes_follow))
   193			return false;
 > 194		switch (ptr->attributes_follow) {
   195		case TRUE:
   196			if (!xdrgen_decode_fattr3(xdr, &ptr->u.attributes))
   197				return false;
   198			break;
   199		}
   200		return true;
   201	}
   202	

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

                 reply	other threads:[~2025-11-17 15:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202511172336.Y75zj4v6-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=chuck.lever@oracle.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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;
as well as URLs for NNTP newsgroup(s).