Linux driver-core infrastructure
 help / color / mirror / Atom feed
* [PATCH v6 0/2] device property: add test cases for fwnode_for_each_child_node()
@ 2026-07-21 10:54 Xu Yang
  2026-07-21 10:54 ` [PATCH v6 1/2] of: kobj: export of_node_ktype for use by modules Xu Yang
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Xu Yang @ 2026-07-21 10:54 UTC (permalink / raw)
  To: gregkh, rafael, dakr, robh, saravanak, andriy.shevchenko
  Cc: bartosz.golaszewski, driver-core, linux-kernel, devicetree, imx

From: Xu Yang <xu.yang_2@nxp.com>

This patchset will fix lkp reported issue when adding test cases for
fwnode_for_each_child_node().

  ERROR: modpost: "of_node_ktype"
    [drivers/base/test/property-entry-test.ko] undefined!

Xu Yang (2):
  of: kobj: export of_node_ktype for use by modules
  device property: add test cases for fwnode_for_each_child_node()

 drivers/base/test/Kconfig               |   1 +
 drivers/base/test/property-entry-test.c | 137 ++++++++++++++++++++++++
 drivers/of/kobj.c                       |   2 +
 3 files changed, 140 insertions(+)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH v6 1/2] of: kobj: export of_node_ktype for use by modules
  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 ` Xu Yang
  2026-07-21 11:16   ` Andy Shevchenko
  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
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 11+ messages in thread
From: Xu Yang @ 2026-07-21 10:54 UTC (permalink / raw)
  To: gregkh, rafael, dakr, robh, saravanak, andriy.shevchenko
  Cc: bartosz.golaszewski, driver-core, linux-kernel, devicetree, imx

From: Xu Yang <xu.yang_2@nxp.com>

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.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202607181651.RnUuV8n6-lkp@intel.com/
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>

---
Changes in v6:
 - use EXPORT_SYMBOL_IF_KUNIT as suggested by Andy Shevchenko
Changes in v5:
 - new one
---
 drivers/of/kobj.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/of/kobj.c b/drivers/of/kobj.c
index 1bb61a2c3399..081b8fa38603 100644
--- a/drivers/of/kobj.c
+++ b/drivers/of/kobj.c
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0
 #include <linux/of.h>
 #include <linux/slab.h>
+#include <kunit/visibility.h>
 
 #include "of_private.h"
 
@@ -27,6 +28,7 @@ static void of_node_release(struct kobject *kobj)
 const struct kobj_type of_node_ktype = {
 	.release = of_node_release,
 };
+EXPORT_SYMBOL_IF_KUNIT(of_node_ktype);
 
 static ssize_t of_node_property_read(struct file *filp, struct kobject *kobj,
 				const struct bin_attribute *bin_attr, char *buf,
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v6 2/2] device property: add test cases for fwnode_for_each_child_node()
  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 10:54 ` Xu Yang
  2026-07-21 11:17   ` Andy Shevchenko
  2026-07-21 11:15 ` [PATCH v6 0/2] " Andy Shevchenko
  2026-07-21 21:43 ` Danilo Krummrich
  3 siblings, 1 reply; 11+ messages in thread
From: Xu Yang @ 2026-07-21 10:54 UTC (permalink / raw)
  To: gregkh, rafael, dakr, robh, saravanak, andriy.shevchenko
  Cc: bartosz.golaszewski, driver-core, linux-kernel, devicetree, imx

From: Xu Yang <xu.yang_2@nxp.com>

Add test cases for fwnode_for_each_child_node() API.

Test command:
$ ./tools/testing/kunit/kunit.py run property-entry

Signed-off-by: Xu Yang <xu.yang_2@nxp.com>

---
Changes in v6:
 - add MODULE_IMPORT_NS("EXPORTED_FOR_KUNIT_TESTING")
 - remove Andy's tag
Changes in v5:
 - add patch#1 to fix "of_node_ktype undefined error"
---
 drivers/base/test/Kconfig               |   1 +
 drivers/base/test/property-entry-test.c | 137 ++++++++++++++++++++++++
 2 files changed, 138 insertions(+)

diff --git a/drivers/base/test/Kconfig b/drivers/base/test/Kconfig
index 1ecf0791241a..542ce07530a1 100644
--- a/drivers/base/test/Kconfig
+++ b/drivers/base/test/Kconfig
@@ -17,6 +17,7 @@ config DM_KUNIT_TEST
 config DRIVER_PE_KUNIT_TEST
 	tristate "KUnit Tests for property entry API" if !KUNIT_ALL_TESTS
 	depends on KUNIT
+	select OF
 	default KUNIT_ALL_TESTS
 
 config DRIVER_SWNODE_KUNIT_TEST
diff --git a/drivers/base/test/property-entry-test.c b/drivers/base/test/property-entry-test.c
index a8657eb06f94..855e73b9b21f 100644
--- a/drivers/base/test/property-entry-test.c
+++ b/drivers/base/test/property-entry-test.c
@@ -4,6 +4,8 @@
 // Copyright 2019 Google LLC.
 
 #include <kunit/test.h>
+
+#include <linux/of.h>
 #include <linux/property.h>
 #include <linux/types.h>
 
@@ -489,6 +491,139 @@ static void pe_test_reference(struct kunit *test)
 	software_node_unregister_node_group(group);
 }
 
+static struct fwnode_handle *create_device_node(struct kunit *test,
+						const char *name,
+						const char *full_name,
+						struct device_node *parent)
+{
+	struct device_node *node;
+
+	node = kunit_kzalloc(test, sizeof(*node), GFP_KERNEL);
+	KUNIT_ASSERT_NOT_ERR_OR_NULL(test, node);
+
+	node->name = kunit_kstrdup(test, name, GFP_KERNEL);
+	node->full_name = kunit_kstrdup(test, full_name, GFP_KERNEL);
+
+	if (parent) {
+		node->sibling = parent->child;
+		/* set the node as the first child of the parent */
+		parent->child = node;
+		node->parent = parent;
+	}
+
+	of_node_init(node);
+	return of_fwnode_handle(node);
+}
+
+/* Verifies that fwnode_for_each_child_node() can output correct children */
+static void pe_test_child_iteration(struct kunit *test)
+{
+	struct fwnode_handle *of_node, *of_node1;
+	struct fwnode_handle *sw_node, *sw_node1;
+	struct fwnode_handle *child;
+	int error, i, num;
+
+	static const struct software_node node = { .name = "sw" };
+	static const struct software_node node1 = { .name = "sw-1", .parent = &node};
+	static const struct software_node node2 = { .name = "sw-2", .parent = &node};
+	static const struct software_node node3 = { .name = "sw-3", .parent = &node};
+	static const struct software_node *group[] = { &node, &node1, &node2, &node3, NULL };
+
+	static const char * const of_child_array[] = { "of-1", "of-2", "of-3" };
+	static const char * const sw_child_array[] = { "sw-1", "sw-2", "sw-3" };
+	static const char * const of_sw_child_array[] = { "of-1", "of-2", "of-3",
+							  "sw-1", "sw-2", "sw-3" };
+	static const char * const sw_of_child_array[] = { "sw-1", "sw-2", "sw-3",
+							  "of-1", "of-2", "of-3" };
+
+	/* 1. Test OF node child iteration */
+
+	of_node = create_device_node(test, "of", "of", NULL);
+	create_device_node(test, "of", "of-3", to_of_node(of_node));
+	create_device_node(test, "of", "of-2", to_of_node(of_node));
+	of_node1 = create_device_node(test, "of", "of-1", to_of_node(of_node));
+
+	i = 0;
+	num = ARRAY_SIZE(of_child_array);
+	fwnode_for_each_child_node(of_node, child) {
+		KUNIT_ASSERT_LT(test, i, num);
+		KUNIT_EXPECT_STREQ(test, of_child_array[i++], fwnode_get_name(child));
+	}
+	KUNIT_EXPECT_PTR_EQ(test, child, NULL);
+
+	/* 2. Test SW node child iteration */
+
+	error = software_node_register_node_group(group);
+	KUNIT_ASSERT_EQ(test, error, 0);
+
+	sw_node = software_node_fwnode(&node);
+
+	i = 0;
+	num = ARRAY_SIZE(sw_child_array);
+	fwnode_for_each_child_node(sw_node, child) {
+		KUNIT_ASSERT_LT(test, i, num);
+		KUNIT_EXPECT_STREQ(test, sw_child_array[i++], fwnode_get_name(child));
+	}
+	KUNIT_EXPECT_PTR_EQ(test, child, NULL);
+
+	/* 3. Test OF (primary) + SW (secondary) node child iteration */
+
+	of_node->secondary = sw_node;
+	sw_node->secondary = ERR_PTR(-ENODEV);
+
+	i = 0;
+	num = ARRAY_SIZE(of_sw_child_array);
+	fwnode_for_each_child_node(of_node, child) {
+		KUNIT_ASSERT_LT(test, i, num);
+		KUNIT_EXPECT_STREQ(test, of_sw_child_array[i++], fwnode_get_name(child));
+	}
+	KUNIT_EXPECT_PTR_EQ(test, child, NULL);
+
+	/* 4. Test SW (primary) + OF (secondary) node child iteration */
+
+	sw_node->secondary = of_node;
+	of_node->secondary = ERR_PTR(-ENODEV);
+
+	i = 0;
+	num = ARRAY_SIZE(sw_of_child_array);
+	fwnode_for_each_child_node(sw_node, child) {
+		KUNIT_ASSERT_LT(test, i, num);
+		KUNIT_EXPECT_STREQ(test, sw_of_child_array[i++], fwnode_get_name(child));
+	}
+	KUNIT_EXPECT_PTR_EQ(test, child, NULL);
+
+	/* 5. Test OF (primary) + SW (secondary, but no children) node child iteration */
+
+	sw_node1 = software_node_fwnode(&node1);
+	of_node->secondary = sw_node1;
+	sw_node->secondary = ERR_PTR(-ENODEV);
+
+	i = 0;
+	num = ARRAY_SIZE(of_child_array);
+	fwnode_for_each_child_node(of_node, child) {
+		KUNIT_ASSERT_LT(test, i, num);
+		KUNIT_EXPECT_STREQ(test, of_child_array[i++], fwnode_get_name(child));
+	}
+	KUNIT_EXPECT_PTR_EQ(test, child, NULL);
+
+	/* 6. Test SW (primary) + OF (secondary, but no children) node child iteration */
+
+	sw_node->secondary = of_node1;
+	of_node->secondary = ERR_PTR(-ENODEV);
+
+	i = 0;
+	num = ARRAY_SIZE(sw_child_array);
+	fwnode_for_each_child_node(sw_node, child) {
+		KUNIT_ASSERT_LT(test, i, num);
+		KUNIT_EXPECT_STREQ(test, sw_child_array[i++], fwnode_get_name(child));
+	}
+	KUNIT_EXPECT_PTR_EQ(test, child, NULL);
+
+	of_node->secondary = NULL;
+	sw_node->secondary = NULL;
+	software_node_unregister_node_group(group);
+}
+
 static struct kunit_case property_entry_test_cases[] = {
 	KUNIT_CASE(pe_test_uints),
 	KUNIT_CASE(pe_test_uint_arrays),
@@ -497,6 +632,7 @@ static struct kunit_case property_entry_test_cases[] = {
 	KUNIT_CASE(pe_test_move_inline_u8),
 	KUNIT_CASE(pe_test_move_inline_str),
 	KUNIT_CASE(pe_test_reference),
+	KUNIT_CASE(pe_test_child_iteration),
 	{ }
 };
 
@@ -509,4 +645,5 @@ kunit_test_suite(property_entry_test_suite);
 
 MODULE_DESCRIPTION("Test module for the property entry API");
 MODULE_AUTHOR("Dmitry Torokhov <dtor@chromium.org>");
+MODULE_IMPORT_NS("EXPORTED_FOR_KUNIT_TESTING");
 MODULE_LICENSE("GPL");
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH v6 0/2] device property: add test cases for fwnode_for_each_child_node()
  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 10:54 ` [PATCH v6 2/2] device property: add test cases for fwnode_for_each_child_node() Xu Yang
@ 2026-07-21 11:15 ` Andy Shevchenko
  2026-07-21 14:28   ` Xu Yang
  2026-07-21 21:43 ` Danilo Krummrich
  3 siblings, 1 reply; 11+ messages in thread
From: Andy Shevchenko @ 2026-07-21 11:15 UTC (permalink / raw)
  To: Xu Yang
  Cc: gregkh, rafael, dakr, robh, saravanak, bartosz.golaszewski,
	driver-core, linux-kernel, devicetree, imx

On Tue, Jul 21, 2026 at 06:54:46PM +0800, Xu Yang wrote:

> This patchset will fix lkp reported issue when adding test cases for
> fwnode_for_each_child_node().
> 
>   ERROR: modpost: "of_node_ktype"
>     [drivers/base/test/property-entry-test.ko] undefined!

Why v6? Where is changelog?
No need to resend this time, reply with missing information added.

> Xu Yang (2):
>   of: kobj: export of_node_ktype for use by modules
>   device property: add test cases for fwnode_for_each_child_node()

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v6 1/2] of: kobj: export of_node_ktype for use by modules
  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:16   ` Andy Shevchenko
  2026-07-21 11:18     ` Andy Shevchenko
  2026-07-21 14:29     ` Xu Yang
  2026-07-21 13:37   ` Rob Herring
  1 sibling, 2 replies; 11+ messages in thread
From: Andy Shevchenko @ 2026-07-21 11:16 UTC (permalink / raw)
  To: Xu Yang
  Cc: gregkh, rafael, dakr, robh, saravanak, bartosz.golaszewski,
	driver-core, linux-kernel, devicetree, imx

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.

...

>  #include <linux/of.h>
>  #include <linux/slab.h>

+ blank line.

> +#include <kunit/visibility.h>
>  
>  #include "of_private.h"

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v6 2/2] device property: add test cases for fwnode_for_each_child_node()
  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:17   ` Andy Shevchenko
  0 siblings, 0 replies; 11+ messages in thread
From: Andy Shevchenko @ 2026-07-21 11:17 UTC (permalink / raw)
  To: Xu Yang
  Cc: gregkh, rafael, dakr, robh, saravanak, bartosz.golaszewski,
	driver-core, linux-kernel, devicetree, imx

On Tue, Jul 21, 2026 at 06:54:48PM +0800, Xu Yang wrote:

> Add test cases for fwnode_for_each_child_node() API.
> 
> Test command:
> $ ./tools/testing/kunit/kunit.py run property-entry

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

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v6 1/2] of: kobj: export of_node_ktype for use by modules
  2026-07-21 11:16   ` Andy Shevchenko
@ 2026-07-21 11:18     ` Andy Shevchenko
  2026-07-21 14:29     ` Xu Yang
  1 sibling, 0 replies; 11+ messages in thread
From: Andy Shevchenko @ 2026-07-21 11:18 UTC (permalink / raw)
  To: Xu Yang
  Cc: gregkh, rafael, dakr, robh, saravanak, bartosz.golaszewski,
	driver-core, linux-kernel, devicetree, imx

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



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v6 1/2] of: kobj: export of_node_ktype for use by modules
  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:16   ` Andy Shevchenko
@ 2026-07-21 13:37   ` Rob Herring
  1 sibling, 0 replies; 11+ messages in thread
From: Rob Herring @ 2026-07-21 13:37 UTC (permalink / raw)
  To: Xu Yang
  Cc: gregkh, rafael, dakr, saravanak, andriy.shevchenko,
	bartosz.golaszewski, driver-core, linux-kernel, devicetree, imx

On Tue, Jul 21, 2026 at 5:51 AM Xu Yang <xu.yang_2@oss.nxp.com> wrote:
>
> From: Xu Yang <xu.yang_2@nxp.com>
>
> 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.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202607181651.RnUuV8n6-lkp@intel.com/
> Signed-off-by: Xu Yang <xu.yang_2@nxp.com>

Acked-by: Rob Herring (Arm) <robh@kernel.org>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v6 0/2] device property: add test cases for fwnode_for_each_child_node()
  2026-07-21 11:15 ` [PATCH v6 0/2] " Andy Shevchenko
@ 2026-07-21 14:28   ` Xu Yang
  0 siblings, 0 replies; 11+ messages in thread
From: Xu Yang @ 2026-07-21 14:28 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: gregkh, rafael, dakr, robh, saravanak, bartosz.golaszewski,
	driver-core, linux-kernel, devicetree, imx

Hi Andy,

On Tue, Jul 21, 2026 at 02:15:22PM +0300, Andy Shevchenko wrote:
> On Tue, Jul 21, 2026 at 06:54:46PM +0800, Xu Yang wrote:
> 
> > This patchset will fix lkp reported issue when adding test cases for
> > fwnode_for_each_child_node().
> > 
> >   ERROR: modpost: "of_node_ktype"
> >     [drivers/base/test/property-entry-test.ko] undefined!
> 
> Why v6? Where is changelog?
> No need to resend this time, reply with missing information added.

The previous patchset was v5, which I created by continuing from the
v4 patchset you had pushed.
So I continue v6 here.

Changes in v6:
 - Use EXPORT_SYMBOL_IF_KUNIT(of_node_ktype) for kuint test

Changes in v5:
 - add EXPORT_SYMBOL_GPL(of_node_ktype) to fix the issue
 - Link: https://lore.kernel.org/driver-core/20260720104730.1285552-1-xu.yang_2@oss.nxp.com/

Thanks,
Xu Yang

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v6 1/2] of: kobj: export of_node_ktype for use by modules
  2026-07-21 11:16   ` Andy Shevchenko
  2026-07-21 11:18     ` Andy Shevchenko
@ 2026-07-21 14:29     ` Xu Yang
  1 sibling, 0 replies; 11+ messages in thread
From: Xu Yang @ 2026-07-21 14:29 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: gregkh, rafael, dakr, robh, saravanak, bartosz.golaszewski,
	driver-core, linux-kernel, devicetree, imx

On Tue, Jul 21, 2026 at 02:16:19PM +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.
> 
> ...
> 
> >  #include <linux/of.h>
> >  #include <linux/slab.h>
> 
> + blank line.

OK.

Thanks,
Xu Yang

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v6 0/2] device property: add test cases for fwnode_for_each_child_node()
  2026-07-21 10:54 [PATCH v6 0/2] device property: add test cases for fwnode_for_each_child_node() Xu Yang
                   ` (2 preceding siblings ...)
  2026-07-21 11:15 ` [PATCH v6 0/2] " Andy Shevchenko
@ 2026-07-21 21:43 ` Danilo Krummrich
  3 siblings, 0 replies; 11+ messages in thread
From: Danilo Krummrich @ 2026-07-21 21:43 UTC (permalink / raw)
  To: Xu Yang
  Cc: gregkh, rafael, dakr, robh, saravanak, andriy.shevchenko,
	bartosz.golaszewski, driver-core, linux-kernel, devicetree, imx

On Tue, 21 Jul 2026 18:54:46 +0800, Xu Yang wrote:
> [PATCH v6 0/2] device property: add test cases for fwnode_for_each_child_node()

Applied, thanks!

  Branch: driver-core-testing
  Tree:   git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core.git

[1/2] of: kobj: export of_node_ktype for use by modules
      commit: 08bc14983723

      [ Add empty line before the kunit include. - Danilo ]

[2/2] device property: add test cases for fwnode_for_each_child_node()
      commit: 0e6f8ccd4618

The patches will appear in the next linux-next integration (typically within 24
hours on weekdays).

The patches are in the driver-core-testing branch and will be promoted to
driver-core-next after validation.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-07-21 21:44 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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:16   ` Andy Shevchenko
2026-07-21 11:18     ` Andy Shevchenko
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: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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox