linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: kernel test robot <lkp@intel.com>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>,
	llvm@lists.linux.dev, kbuild-all@lists.01.org,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [linux-next:master 3575/3976] mm/memory-tiers.c:647:35: error: use of undeclared identifier 'top_tier_adistance'
Date: Tue, 30 Aug 2022 15:20:42 -0700	[thread overview]
Message-ID: <20220830152042.8e0914c28d3397e16b5c6255@linux-foundation.org> (raw)
In-Reply-To: <202208310340.bfIiSHdK-lkp@intel.com>

On Wed, 31 Aug 2022 03:25:27 +0800 kernel test robot <lkp@intel.com> 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 <lkp@intel.com>
> 
> 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?



      reply	other threads:[~2022-08-30 22:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-30 19:25 [linux-next:master 3575/3976] mm/memory-tiers.c:647:35: error: use of undeclared identifier 'top_tier_adistance' kernel test robot
2022-08-30 22:20 ` Andrew Morton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220830152042.8e0914c28d3397e16b5c6255@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).