Devicetree
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Xu Yang <xu.yang_2@oss.nxp.com>
Cc: gregkh@linuxfoundation.org, rafael@kernel.org, dakr@kernel.org,
	robh@kernel.org, saravanak@kernel.org,
	bartosz.golaszewski@oss.qualcomm.com,
	driver-core@lists.linux.dev, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, imx@lists.linux.dev
Subject: Re: [PATCH v6 1/2] of: kobj: export of_node_ktype for use by modules
Date: Tue, 21 Jul 2026 14:18:20 +0300	[thread overview]
Message-ID: <al9VfFqH_1-Rl4s4@ashevche-desk.local> (raw)
In-Reply-To: <al9VA_v8tcvS1hY1@ashevche-desk.local>

On Tue, Jul 21, 2026 at 02:16:24PM +0300, Andy Shevchenko wrote:
> On Tue, Jul 21, 2026 at 06:54:47PM +0800, Xu Yang wrote:
> 
> > of_node_init() is a static inline that references of_node_ktype when
> > CONFIG_OF_KOBJ=y. Any module that calls of_node_init() will therefore
> > have an unresolved reference to of_node_ktype at load time, because
> > the symbol is defined in drivers/of/kobj.c but was never exported.
> > 
> > This causes a modpost build error when CONFIG_OF_KOBJ=y and
> > CONFIG_DRIVER_PE_KUNIT_TEST=m:
> > 
> >   ERROR: modpost: "of_node_ktype"
> >   [drivers/base/test/property-entry-test.ko] undefined!
> > 
> > Add EXPORT_SYMBOL_IF_KUNIT(of_node_ktype) so that modules such as the
> > KUnit property-entry test can call of_node_init() without hitting this
> > linker error.

Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

...

> >  #include <linux/of.h>
> >  #include <linux/slab.h>
> 
> + blank line.
> 
> > +#include <kunit/visibility.h>
> >  
> >  #include "of_private.h"

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2026-07-21 11:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-21 10:54 [PATCH v6 0/2] device property: add test cases for fwnode_for_each_child_node() Xu Yang
2026-07-21 10:54 ` [PATCH v6 1/2] of: kobj: export of_node_ktype for use by modules Xu Yang
2026-07-21 11:03   ` sashiko-bot
2026-07-21 11:16   ` Andy Shevchenko
2026-07-21 11:18     ` Andy Shevchenko [this message]
2026-07-21 14:29     ` Xu Yang
2026-07-21 13:37   ` Rob Herring
2026-07-21 10:54 ` [PATCH v6 2/2] device property: add test cases for fwnode_for_each_child_node() Xu Yang
2026-07-21 11:08   ` sashiko-bot
2026-07-21 11:17   ` Andy Shevchenko
2026-07-21 11:15 ` [PATCH v6 0/2] " Andy Shevchenko
2026-07-21 14:28   ` Xu Yang
2026-07-21 21:43 ` Danilo Krummrich

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=al9VfFqH_1-Rl4s4@ashevche-desk.local \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=bartosz.golaszewski@oss.qualcomm.com \
    --cc=dakr@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=driver-core@lists.linux.dev \
    --cc=gregkh@linuxfoundation.org \
    --cc=imx@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=robh@kernel.org \
    --cc=saravanak@kernel.org \
    --cc=xu.yang_2@oss.nxp.com \
    /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