From: kernel test robot <lkp@intel.com>
To: NeilBrown <neilb@suse.de>, Trond Myklebust <trondmy@kernel.org>,
Anna Schumaker <anna@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
David Disseldorp <ddiss@suse.com>,
linux-nfs@vger.kernel.org
Subject: Re: [PATCH 2/2] NFS: move _maxsz and _sz #defines to the function which they describe.
Date: Wed, 4 Dec 2024 20:26:33 +0800 [thread overview]
Message-ID: <202412042050.xy58M3zN-lkp@intel.com> (raw)
In-Reply-To: <20241204025703.2662394-3-neilb@suse.de>
Hi NeilBrown,
kernel test robot noticed the following build warnings:
[auto build test WARNING on trondmy-nfs/linux-next]
[also build test WARNING on linus/master v6.13-rc1 next-20241203]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/NeilBrown/NFS-fix-open_owner_id_maxsz-and-related-fields/20241204-124433
base: git://git.linux-nfs.org/projects/trondmy/linux-nfs.git linux-next
patch link: https://lore.kernel.org/r/20241204025703.2662394-3-neilb%40suse.de
patch subject: [PATCH 2/2] NFS: move _maxsz and _sz #defines to the function which they describe.
config: powerpc-linkstation_defconfig (https://download.01.org/0day-ci/archive/20241204/202412042050.xy58M3zN-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 592c0fe55f6d9a811028b5f3507be91458ab2713)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241204/202412042050.xy58M3zN-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/202412042050.xy58M3zN-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from fs/nfs/nfs4xdr.c:40:
In file included from include/linux/mm.h:2213:
include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
518 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
>> fs/nfs/nfs4xdr.c:3040:9: warning: 'decode_sequence_maxsz' macro redefined [-Wmacro-redefined]
3040 | #define decode_sequence_maxsz (op_decode_hdr_maxsz + \
| ^
fs/nfs/nfs4xdr.c:135:9: note: previous definition is here
135 | #define decode_sequence_maxsz 0
| ^
>> fs/nfs/nfs4xdr.c:6068:9: warning: 'encode_sequence_maxsz' macro redefined [-Wmacro-redefined]
6068 | #define encode_sequence_maxsz (op_encode_hdr_maxsz + \
| ^
fs/nfs/nfs4xdr.c:134:9: note: previous definition is here
134 | #define encode_sequence_maxsz 0
| ^
3 warnings generated.
vim +/decode_sequence_maxsz +3040 fs/nfs/nfs4xdr.c
3039
> 3040 #define decode_sequence_maxsz (op_decode_hdr_maxsz + \
3041 XDR_QUADLEN(NFS4_MAX_SESSIONID_LEN) + 5)
3042 static int decode_sequence(struct xdr_stream *xdr,
3043 struct nfs4_sequence_res *res,
3044 struct rpc_rqst *rqstp)
3045 {
3046 #if defined(CONFIG_NFS_V4_1)
3047 struct nfs4_session *session;
3048 struct nfs4_sessionid id;
3049 u32 dummy;
3050 int status;
3051 __be32 *p;
3052
3053 if (res->sr_slot == NULL)
3054 return 0;
3055 if (!res->sr_slot->table->session)
3056 return 0;
3057
3058 status = decode_op_hdr(xdr, OP_SEQUENCE);
3059 if (!status)
3060 status = decode_sessionid(xdr, &id);
3061 if (unlikely(status))
3062 goto out_err;
3063
3064 /*
3065 * If the server returns different values for sessionID, slotID or
3066 * sequence number, the server is looney tunes.
3067 */
3068 status = -EREMOTEIO;
3069 session = res->sr_slot->table->session;
3070
3071 if (memcmp(id.data, session->sess_id.data,
3072 NFS4_MAX_SESSIONID_LEN)) {
3073 dprintk("%s Invalid session id\n", __func__);
3074 goto out_err;
3075 }
3076
3077 p = xdr_inline_decode(xdr, 20);
3078 if (unlikely(!p))
3079 goto out_overflow;
3080
3081 /* seqid */
3082 dummy = be32_to_cpup(p++);
3083 if (dummy != res->sr_slot->seq_nr) {
3084 dprintk("%s Invalid sequence number\n", __func__);
3085 goto out_err;
3086 }
3087 /* slot id */
3088 dummy = be32_to_cpup(p++);
3089 if (dummy != res->sr_slot->slot_nr) {
3090 dprintk("%s Invalid slot id\n", __func__);
3091 goto out_err;
3092 }
3093 /* highest slot id */
3094 res->sr_highest_slotid = be32_to_cpup(p++);
3095 /* target highest slot id */
3096 res->sr_target_highest_slotid = be32_to_cpup(p++);
3097 /* result flags */
3098 res->sr_status_flags = be32_to_cpup(p);
3099 status = 0;
3100 out_err:
3101 res->sr_status = status;
3102 return status;
3103 out_overflow:
3104 status = -EIO;
3105 goto out_err;
3106 #else /* CONFIG_NFS_V4_1 */
3107 return 0;
3108 #endif /* CONFIG_NFS_V4_1 */
3109 }
3110
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-12-04 12:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-04 2:53 [PATCH 0/2] NFS - fix some _maxsz and _sz #defines NeilBrown
2024-12-04 2:53 ` [PATCH 1/2] NFS: fix open_owner_id_maxsz and related fields NeilBrown
2024-12-04 2:53 ` [PATCH 2/2] NFS: move _maxsz and _sz #defines to the function which they describe NeilBrown
2024-12-04 12:26 ` kernel test robot [this message]
2024-12-04 14:03 ` kernel test robot
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=202412042050.xy58M3zN-lkp@intel.com \
--to=lkp@intel.com \
--cc=anna@kernel.org \
--cc=ddiss@suse.com \
--cc=linux-nfs@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=neilb@suse.de \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=trondmy@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