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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id B57E7ECAAD4 for ; Tue, 30 Aug 2022 22:20:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E3C718000F; Tue, 30 Aug 2022 18:20:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DEB638D0001; Tue, 30 Aug 2022 18:20:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C8CAE8000F; Tue, 30 Aug 2022 18:20:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id B7AC08D0001 for ; Tue, 30 Aug 2022 18:20:46 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 989E5C0492 for ; Tue, 30 Aug 2022 22:20:46 +0000 (UTC) X-FDA: 79857679692.19.4FB891E Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf01.hostedemail.com (Postfix) with ESMTP id E4DB940041 for ; Tue, 30 Aug 2022 22:20:45 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 4EE65B81E2A; Tue, 30 Aug 2022 22:20:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E2A5AC433D6; Tue, 30 Aug 2022 22:20:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1661898043; bh=zj1AqnuLESei39yoWq+PuLriWqWgl063cnr+Lbm14uY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=gE87R8qQthoRQ2pa2nMBFZBmXpd4jQosBJl1PNFLLbkTmO1UMD2OarS7UaZJE+DY1 9f/5z3v7CLol6IIRcv4R5hn8BljiC+NE3WS0vD1XVXVe0uUJbaBACYJ4n9qkWHcOz3 4R+XEPmQ6xUkAeDti7V2fqgBU/N3wZrNiUoSBElg= Date: Tue, 30 Aug 2022 15:20:42 -0700 From: Andrew Morton To: kernel test robot Cc: "Aneesh Kumar K.V" , llvm@lists.linux.dev, kbuild-all@lists.01.org, Linux Memory Management List Subject: Re: [linux-next:master 3575/3976] mm/memory-tiers.c:647:35: error: use of undeclared identifier 'top_tier_adistance' Message-Id: <20220830152042.8e0914c28d3397e16b5c6255@linux-foundation.org> In-Reply-To: <202208310340.bfIiSHdK-lkp@intel.com> References: <202208310340.bfIiSHdK-lkp@intel.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=gE87R8qQ; spf=pass (imf01.hostedemail.com: domain of akpm@linux-foundation.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1661898046; a=rsa-sha256; cv=none; b=dA7VAC0hbMP66OyoCCbONsGasYRijuHS//8VywO2C3lytU1m123qEXgnBZ++2X5cGIeLE7 5HtfKRkOHjwn8Qsv4kgbHjUIfUx3LNszexFeUvInlAD4QGO2Qgn0RpFza71Rl+fmYmYUBl eFEFLmQRjZnp8xeAUBc55q5dPDSNASE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1661898046; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=cRUh7XerjpkfsGpvKr3FtNRGA7z+A7Dy7erBqCA+/l0=; b=idINLBkS2ANmy2Hhk8xvi3YmN3Yud75PU3Ad7h0ugXOtoS51f/akt4cM0kDQkSQMhOkDes C9+sBmV4u/LpjomJ6aP04OqTKGX0Ed8BFKWazsHm8+RbSywLdC0NyfuvpwCUX2D9gRh5Y5 Sht8dQqopvR+MRWibtFaGOXLr229a7A= X-Stat-Signature: qhjdnk1jsk913mpcwr6u8qq1y4314xpr X-Rspamd-Queue-Id: E4DB940041 Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=gE87R8qQ; spf=pass (imf01.hostedemail.com: domain of akpm@linux-foundation.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Rspam-User: X-Rspamd-Server: rspam11 X-HE-Tag: 1661898045-138404 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, 31 Aug 2022 03:25:27 +0800 kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > head: 282342f2dc97ccf54254c5de51bcc1101229615f > commit: 2ec921a84615ee0665bcc369d40b92e2bed66cd5 [3575/3976] mm/demotion: expose memory tier details via sysfs > config: x86_64-randconfig-a016 (https://download.01.org/0day-ci/archive/20220831/202208310340.bfIiSHdK-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://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=2ec921a84615ee0665bcc369d40b92e2bed66cd5 > 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 2ec921a84615ee0665bcc369d40b92e2bed66cd5 > # 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=x86_64 SHELL=/bin/bash > > If you fix the issue, kindly add following tag where applicable > Reported-by: kernel test robot > > All errors (new ones prefixed by >>): > > >> mm/memory-tiers.c:647:35: error: use of undeclared identifier 'top_tier_adistance' > if (memtier->adistance_start >= top_tier_adistance) > ^ > 1 error generated. Thanks, I'll do this for now: --- a/mm/memory-tiers.c~mm-demotion-expose-memory-tier-details-via-sysfs-fix-2 +++ a/mm/memory-tiers.c @@ -108,7 +108,20 @@ static int top_tier_adistance; * */ static struct demotion_nodes *node_demotion __read_mostly; -#endif /* CONFIG_MIGRATION */ + +/* I need a comment too */ +static inline bool i_need_a_name(struct memory_tier *memtier) +{ + return memtier->adistance_start >= top_tier_adistance; +} + +#else /* CONFIG_MIGRATION */ + +static inline bool i_need_a_name(struct memory_tier *memtier) +{ + return false; +} +#endif /* CONFIG_MIGRATION */ static __always_inline nodemask_t get_memtier_nodemask(struct memory_tier *memtier) { @@ -648,7 +661,7 @@ static ssize_t toptier_nodes_show(struct mutex_lock(&memory_tier_lock); list_for_each_entry(memtier, &memory_tiers, list) { - if (memtier->adistance_start >= top_tier_adistance) + if (i_need_a_name(memtier)) break; nmask = get_memtier_nodemask(memtier); nodes_or(top_tier_mask, top_tier_mask, nmask); Aneesh, please provide suitable name and comment?