From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A079C433ED for ; Thu, 13 May 2021 17:48:06 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E9B5E61435 for ; Thu, 13 May 2021 17:48:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E9B5E61435 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 6309C6B0036; Thu, 13 May 2021 13:48:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5E10B6B006E; Thu, 13 May 2021 13:48:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4CF106B0070; Thu, 13 May 2021 13:48:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0097.hostedemail.com [216.40.44.97]) by kanga.kvack.org (Postfix) with ESMTP id 1EC646B0036 for ; Thu, 13 May 2021 13:48:05 -0400 (EDT) Received: from smtpin39.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id B44AD1802E616 for ; Thu, 13 May 2021 17:48:04 +0000 (UTC) X-FDA: 78136941288.39.7EF9911 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf13.hostedemail.com (Postfix) with ESMTP id 485B2E000107 for ; Thu, 13 May 2021 17:48:03 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 536EC613CB; Thu, 13 May 2021 17:48:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1620928083; bh=4WL9JmLXDAIRmAga8sX70LYTg7XmKLM0lmHEuciPJlo=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=ukSTk0AAIF9IBYt2xuUqZCwezaCFY5+KUau+bgOtHw+JtKmxjlw6xShZIHeGIn5mo FNRh6CFfx0bO3c3/+TwLi8RuzUPeTqb8rzE32sJyrgZMaC/EfdCrCzXlRztZ2Iulaq IWOvasbv7bzuMNVlVFGiSwXbBqbjxSW3zEkxdkwyXpTykoQ/XPoundOeypXf3B4Q+K L0h3EzRMBbAc5obhH5QXDVxYmmuSbjSBLy4rBGKayUkQoND417Jef3ehat+VaSaWOx 3iQmJnX8vd5LL8+1APNW1hh5ZV5Zx68WQVvU3wh05BDoCFACFlZOSo4QgzXRvg0e4O bxZNu3wZPbRmQ== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 1DC665C014E; Thu, 13 May 2021 10:48:03 -0700 (PDT) Date: Thu, 13 May 2021 10:48:03 -0700 From: "Paul E. McKenney" To: kernel test robot Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com, Linux Memory Management List Subject: Re: [linux-next:master 1888/2633] kernel/rcu/refscale.c:479:3: warning: variable 'x' is uninitialized when used here Message-ID: <20210513174803.GC975577@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org References: <202105121916.mj2oXShS-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202105121916.mj2oXShS-lkp@intel.com> Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=ukSTk0AA; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf13.hostedemail.com: domain of "SRS0=CslX=KI=paulmck-ThinkPad-P17-Gen-1.home=paulmck@kernel.org" designates 198.145.29.99 as permitted sender) smtp.mailfrom="SRS0=CslX=KI=paulmck-ThinkPad-P17-Gen-1.home=paulmck@kernel.org" X-Stat-Signature: wno9udw8u1xk6uwm8s7t75hz4bn7gioj X-Rspamd-Queue-Id: 485B2E000107 X-Rspamd-Server: rspam02 X-HE-Tag: 1620928083-665295 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, May 12, 2021 at 07:38:22PM +0800, kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > head: ec85c95b0c90a17413901b018e8ade7b9eae7cad > commit: 4b46fcb7f1a6a202e3f77ce377079b4243d1be6f [1888/2633] refscale: Add measurement of clock readout > config: riscv-randconfig-r022-20210512 (attached as .config) > compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project a0fed635fe1701470062495a6ffee1c608f3f1bc) > 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 > # install riscv cross compiling tool for clang build > # apt-get install binutils-riscv64-linux-gnu > # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=4b46fcb7f1a6a202e3f77ce377079b4243d1be6f > git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git > git fetch --no-tags linux-next master > git checkout 4b46fcb7f1a6a202e3f77ce377079b4243d1be6f > # save the attached .config to linux build tree > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=riscv > > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot > > All warnings (new ones prefixed by >>): > > >> kernel/rcu/refscale.c:479:3: warning: variable 'x' is uninitialized when used here [-Wuninitialized] > x += ktime_get_real_fast_ns(); > ^ > kernel/rcu/refscale.c:474:7: note: initialize the variable 'x' to silence this warning > u64 x; > ^ > = 0 > kernel/rcu/refscale.c:492:3: warning: variable 'x' is uninitialized when used here [-Wuninitialized] > x += ktime_get_real_fast_ns(); > ^ > kernel/rcu/refscale.c:487:7: note: initialize the variable 'x' to silence this warning > u64 x; > ^ > = 0 > 2 warnings generated. > > Kconfig warnings: (for reference only) > WARNING: unmet direct dependencies detected for LOCKDEP > Depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && (FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86) > Selected by > - DEBUG_LOCK_ALLOC && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT Fixed by updated commit 210b2a9a9247 ("refscale: Add measurement of clock readout"). Thanx, Paul > vim +/x +479 kernel/rcu/refscale.c > > 471 > 472 static void ref_clock_section(const int nloops) > 473 { > 474 u64 x; > 475 int i; > 476 > 477 preempt_disable(); > 478 for (i = nloops; i >= 0; i--) { > > 479 x += ktime_get_real_fast_ns(); > 480 } > 481 preempt_enable(); > 482 stopopts = x; > 483 } > 484 > > --- > 0-DAY CI Kernel Test Service, Intel Corporation > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org