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_PASS, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by gnuweeb.org (Postfix) with ESMTPS id A2BF67FD42 for ; Tue, 21 Jun 2022 19:34:15 +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=ZEtlvOxc; 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=1655840055; x=1687376055; h=date:from:to:cc:subject:message-id:mime-version; bh=YBoCVbeBdJSh8NO5hiSopuZoPLZH9R9aCRx5PpVAHZA=; b=ZEtlvOxcPBMtPRNoY/XPlm8PIcVZ9k8EnuDPdKP6VmKH4MIAUoOoTN48 hYUgIhBZw5tHZuTx5ninfFeA660WtBvaHbLauHMmg8GtrNjEy4IiVhhvF 79ATtDSXfROaEf5P7wscSIpvF0kRvZaNEMtqMZ5Dy/F5+seY69LNqu14L DtgGBIz+BM4WGbJUNWzVMmqjPX1W/ICZXKM6M2RJhzgsj/vrnbUfXy1xY 1K+nUNDULA1LU4q6NOtZNAAwRPStrzYI5/RkW87HuIt3XmUbwjZWcPCgf nFcZ7h27w5yI+Tu+KyUGal+CWt1i5QtL+KSSeIdUBn7Kvb1SXWFDFKxzH g==; X-IronPort-AV: E=McAfee;i="6400,9594,10385"; a="260038398" X-IronPort-AV: E=Sophos;i="5.92,210,1650956400"; d="scan'208";a="260038398" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jun 2022 12:34:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,210,1650956400"; d="scan'208";a="833730297" Received: from lkp-server02.sh.intel.com (HELO a67cc04a5eeb) ([10.239.97.151]) by fmsmga006.fm.intel.com with ESMTP; 21 Jun 2022 12:34:11 -0700 Received: from kbuild by a67cc04a5eeb with local (Exim 4.95) (envelope-from ) id 1o3jda-0000KX-QA; Tue, 21 Jun 2022 19:34:10 +0000 Date: Wed, 22 Jun 2022 03:34:00 +0800 From: kernel test robot To: David Howells Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org, GNU/Weeb Mailing List , linux-kernel@vger.kernel.org Subject: [ammarfaizi2-block:dhowells/linux-fs/rxrpc-multiqueue 3/5] fs/afs/rxrpc.c:155:6: warning: variable 'o' is used uninitialized whenever 'if' condition is false Message-ID: <202206220318.jPFg84u7-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-multiqueue head: f37988fef6da3fdc3545e5a65eb9241f82f539f2 commit: 928631b5285b0aaebed61025256868cd126c9281 [3/5] rxrpc: Allow UDP socket sharing for AF_RXRPC service sockets config: i386-randconfig-a015 (https://download.01.org/0day-ci/archive/20220622/202206220318.jPFg84u7-lkp@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project af6d2a0b6825e71965f3e2701a63c239fa0ad70f) 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/928631b5285b0aaebed61025256868cd126c9281 git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block git fetch --no-tags ammarfaizi2-block dhowells/linux-fs/rxrpc-multiqueue git checkout 928631b5285b0aaebed61025256868cd126c9281 # 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 SHELL=/bin/bash fs/afs/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> fs/afs/rxrpc.c:155:6: warning: variable 'o' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] if (!prealloc) ^~~~~~~~~ fs/afs/rxrpc.c:157:48: note: uninitialized use occurs here trace_afs_call(call, afs_call_trace_alloc, 1, o, ^ fs/afs/rxrpc.c:155:2: note: remove the 'if' if its condition is always true if (!prealloc) ^~~~~~~~~~~~~~ fs/afs/rxrpc.c:140:7: note: initialize the variable 'o' to silence this warning int o; ^ = 0 1 warning generated. vim +155 fs/afs/rxrpc.c 131 132 /* 133 * Allocate a call. 134 */ 135 static struct afs_call *afs_alloc_call(struct afs_net *net, 136 const struct afs_call_type *type, 137 bool prealloc, gfp_t gfp) 138 { 139 struct afs_call *call; 140 int o; 141 142 call = kzalloc(sizeof(*call), gfp); 143 if (!call) 144 return NULL; 145 146 call->type = type; 147 call->net = net; 148 call->debug_id = atomic_inc_return(&rxrpc_debug_id); 149 atomic_set(&call->usage, 1); 150 INIT_WORK(&call->async_work, afs_process_async_call); 151 init_waitqueue_head(&call->waitq); 152 spin_lock_init(&call->state_lock); 153 call->iter = &call->def_iter; 154 > 155 if (!prealloc) 156 o = atomic_inc_return(&net->nr_outstanding_calls); 157 trace_afs_call(call, afs_call_trace_alloc, 1, o, 158 __builtin_return_address(0)); 159 return call; 160 } 161 -- 0-DAY CI Kernel Test Service https://01.org/lkp