linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Joshua Hahn <joshua.hahnjy@gmail.com>
Cc: kernel test robot <lkp@intel.com>,
	Oscar Salvador <osalvador@suse.de>,
	oe-kbuild-all@lists.linux.dev,
	Linux Memory Management List <linux-mm@kvack.org>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	Harry Yoo <harry.yoo@oracle.com>,
	Vlastimil Babka <vbabka@suse.cz>
Subject: Re: [akpm-mm:mm-new 61/87] drivers/cxl/core/region.c:2437:22: error: invalid use of undefined type 'struct node_notify'
Date: Sat, 7 Jun 2025 15:30:44 -0700	[thread overview]
Message-ID: <20250607153044.679f7bf380bf1d0d1a373c38@linux-foundation.org> (raw)
In-Reply-To: <20250606192345.3440658-1-joshua.hahnjy@gmail.com>

On Fri,  6 Jun 2025 12:23:45 -0700 Joshua Hahn <joshua.hahnjy@gmail.com> wrote:

> On Sat, 7 Jun 2025 00:19:17 +0800 kernel test robot <lkp@intel.com> wrote:
> 
> > Hi Oscar,
> > 
> > FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.
> > 
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-new
> > head:   b9f05ab60cb240a64e898221de50a037553840c7
> > commit: 7bd79eaa2076cde601d828532a09ea50e20a976f [61/87] drivers,cxl: use node-notifier instead of memory-notifier
> > config: loongarch-randconfig-001-20250606 (https://download.01.org/0day-ci/archive/20250607/202506070030.otNokpsc-lkp@intel.com/config)
> > compiler: loongarch64-linux-gcc (GCC) 15.1.0
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250607/202506070030.otNokpsc-lkp@intel.com/reproduce)
> > 
> > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > the same patch/commit), kindly add following tags
> > | Reported-by: kernel test robot <lkp@intel.com>
> > | Closes: https://lore.kernel.org/oe-kbuild-all/202506070030.otNokpsc-lkp@intel.com/
> > 
> > All errors (new ones prefixed by >>):
> > 
> >    drivers/cxl/core/region.c: In function 'cxl_region_perf_attrs_callback':
> > >> drivers/cxl/core/region.c:2437:22: error: invalid use of undefined type 'struct node_notify'
> >     2437 |         int nid = mnb->nid;
> >          |                      ^~
> >    drivers/cxl/core/region.c:2440:46: error: 'NODE_ADDED_FIRST_MEMORY' undeclared (first use in this function)
> >     2440 |         if (nid == NUMA_NO_NODE || action != NODE_ADDED_FIRST_MEMORY)
> >          |                                              ^~~~~~~~~~~~~~~~~~~~~~~
> >    drivers/cxl/core/region.c:2440:46: note: each undeclared identifier is reported only once for each function it appears in
> >    drivers/cxl/core/region.c: In function 'shutdown_notifiers':
> >    drivers/cxl/core/region.c:3487:9: error: implicit declaration of function 'unregister_node_notifier'; did you mean 'unregister_module_notifier'? [-Wimplicit-function-declaration]
> >     3487 |         unregister_node_notifier(&cxlr->node_notifier);
> >          |         ^~~~~~~~~~~~~~~~~~~~~~~~
> >          |         unregister_module_notifier
> >    drivers/cxl/core/region.c: In function 'cxl_region_probe':
> >    drivers/cxl/core/region.c:3528:9: error: implicit declaration of function 'register_node_notifier'; did you mean 'register_module_notifier'? [-Wimplicit-function-declaration]
> >     3528 |         register_node_notifier(&cxlr->node_notifier);
> >          |         ^~~~~~~~~~~~~~~~~~~~~~
> >          |         register_module_notifier
> 
> >From what I can see, it seems like struct node_notify is conditionally
> defined under #ifdef CONFIG_MEMORY_HOTPLUG, but the callsite unconditionally
> declares struct node_notify *mnb = arg.

Yup.  Also,

-	struct memory_notify *mnb = arg;
+	struct node_notify *mnb = arg;

`mnb' is no longer an appropriate identifier!  Maybe nnb?


      reply	other threads:[~2025-06-07 22:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-06 16:19 [akpm-mm:mm-new 61/87] drivers/cxl/core/region.c:2437:22: error: invalid use of undefined type 'struct node_notify' kernel test robot
2025-06-06 19:23 ` Joshua Hahn
2025-06-07 22:30   ` 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=20250607153044.679f7bf380bf1d0d1a373c38@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=harry.yoo@oracle.com \
    --cc=joshua.hahnjy@gmail.com \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=osalvador@suse.de \
    --cc=vbabka@suse.cz \
    /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).