From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gnuweeb.org (Postfix) with ESMTPS id 03A0C8305A for ; Sat, 11 Feb 2023 01:30:55 +0000 (UTC) Authentication-Results: gnuweeb.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=e2ST0Nuz; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676079056; x=1707615056; h=date:from:to:cc:subject:message-id:mime-version; bh=+UWsdxrOI8sICLOnpXx6z6RZ0IREm2aFB7BYK3ujS0A=; b=e2ST0NuzHkAt7PLgVDO65HlHfrAjJ8xLVspdzXGS1QUGgELDnXccFXig 3p4J3HuaKIrYuLeIUFeoqa4Et/pl8qURZmm1QHT20D1NcLsw1rpL5ux3b YSANcYtIkqeDGqOdizcIe00DrLfiAJEzLm1+I+8iOCTdsDq4Wfsg7Nec6 7I520eoopLLSbduac53GURgOy1DOrOM/6tm+TPqHN+SANFdPeS0PhCEtU 2+7i/q6gi4QqRJ9k27mcZ/dM4p57QkpRwvGmOfPGp3rZH0GrNrA6BepEz IW2FiCW6VuTd+cQCyvVJhR2xI1DDzQMeOc1YRNfRbZro3dXDUmOti4mLO A==; X-IronPort-AV: E=McAfee;i="6500,9779,10617"; a="330578342" X-IronPort-AV: E=Sophos;i="5.97,287,1669104000"; d="scan'208";a="330578342" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2023 17:30:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10617"; a="756971441" X-IronPort-AV: E=Sophos;i="5.97,287,1669104000"; d="scan'208";a="756971441" Received: from lkp-server01.sh.intel.com (HELO 4455601a8d94) ([10.239.97.150]) by FMSMGA003.fm.intel.com with ESMTP; 10 Feb 2023 17:30:52 -0800 Received: from kbuild by 4455601a8d94 with local (Exim 4.96) (envelope-from ) id 1pQej5-0006A9-3C; Sat, 11 Feb 2023 01:30:52 +0000 Date: Sat, 11 Feb 2023 09:30:13 +0800 From: kernel test robot To: David Howells Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, Ammar Faizi , GNU/Weeb Mailing List Subject: [ammarfaizi2-block:dhowells/linux-fs/rxrpc-next 4/10] fs/afs/rxrpc.c:157:6: warning: variable 'o' is used uninitialized whenever 'if' condition is false Message-ID: <202302110939.GED9MYd1-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline List-Id: tree: https://github.com/ammarfaizi2/linux-block dhowells/linux-fs/rxrpc-next head: c661a1d21c087e6a776a85eb4c60fbba29caaf99 commit: 0f2dc9220002c9a8172c453b9550df310bf9bd60 [4/10] rxrpc: Allow UDP socket sharing for AF_RXRPC service sockets config: i386-randconfig-a015 (https://download.01.org/0day-ci/archive/20230211/202302110939.GED9MYd1-lkp@intel.com/config) compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1) 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 # https://github.com/ammarfaizi2/linux-block/commit/0f2dc9220002c9a8172c453b9550df310bf9bd60 git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block git fetch --no-tags ammarfaizi2-block dhowells/linux-fs/rxrpc-next git checkout 0f2dc9220002c9a8172c453b9550df310bf9bd60 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash fs/afs/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot | Link: https://lore.kernel.org/oe-kbuild-all/202302110939.GED9MYd1-lkp@intel.com/ All warnings (new ones prefixed by >>): >> fs/afs/rxrpc.c:157:6: warning: variable 'o' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] if (!prealloc) ^~~~~~~~~ fs/afs/rxrpc.c:159:58: note: uninitialized use occurs here trace_afs_call(call->debug_id, afs_call_trace_alloc, 1, o, ^ fs/afs/rxrpc.c:157:2: note: remove the 'if' if its condition is always true if (!prealloc) ^~~~~~~~~~~~~~ fs/afs/rxrpc.c:142:7: note: initialize the variable 'o' to silence this warning int o; ^ = 0 1 warning generated. vim +157 fs/afs/rxrpc.c 133 134 /* 135 * Allocate a call. 136 */ 137 static struct afs_call *afs_alloc_call(struct afs_net *net, 138 const struct afs_call_type *type, 139 bool prealloc, gfp_t gfp) 140 { 141 struct afs_call *call; 142 int o; 143 144 call = kzalloc(sizeof(*call), gfp); 145 if (!call) 146 return NULL; 147 148 call->type = type; 149 call->net = net; 150 call->debug_id = atomic_inc_return(&rxrpc_debug_id); 151 refcount_set(&call->ref, 1); 152 INIT_WORK(&call->async_work, afs_process_async_call); 153 init_waitqueue_head(&call->waitq); 154 spin_lock_init(&call->state_lock); 155 call->iter = &call->def_iter; 156 > 157 if (!prealloc) 158 o = atomic_inc_return(&net->nr_outstanding_calls); 159 trace_afs_call(call->debug_id, afs_call_trace_alloc, 1, o, 160 __builtin_return_address(0)); 161 return call; 162 } 163 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests