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@xxxxxxxxx/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@xxxxxxxxx/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@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202412042050.xy58M3zN-lkp@xxxxxxxxx/ 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