Skip to contentSkip to conversation

linux-next: build warning after merge of the devicetree tree

PATCH In review Stephen Rothwell 3 participants 10 messages Feb 20, 2023 – Jul 24, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the devicetree tree, today's linux-next build (htmldocs) produced this warning:

include/linux/of.h:115: warning: cannot understand function prototype: 'const struct kobj_type of_node_ktype; '

Introduced by commit

39459ce717b8 ("of: dynamic: add lifecycle docbook info to node creation functions")

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw

PATCH 1/1 of: fix htmldocs build warning

Fix this htmldoc build warning:

include/linux/of.h:115: warning: cannot understand function prototype: 'const struct kobj_type of_node_ktype; '

Reported by: Stephen Rothwell <[email protected]>

Fixes 39459ce717b8 ("of: dynamic: add lifecycle docbook info to node creation functions")
---
 include/linux/of.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

This is actually untested, but seems pretty straight forward.

include/linux/of.h +3 -3
index 0af611307db2..814d33f3835a 100644
@@ -100,6 +100,9 @@ struct of_reconfig_data {
 	struct property		*old_prop;
 };
 
+extern const struct kobj_type of_node_ktype;
+extern const struct fwnode_operations of_fwnode_ops;
+
 /**
  * of_node_init - initialize a devicetree node
  * @node: Pointer to device node that has been created by kzalloc()
@@ -111,9 +114,6 @@ struct of_reconfig_data {
  * whether to free the memory will be done by node->release(), which is
  * of_node_release().
  */
-/* initialize a node */
-extern const struct kobj_type of_node_ktype;
-extern const struct fwnode_operations of_fwnode_ops;
 static inline void of_node_init(struct device_node *node)
 {
 #if defined(CONFIG_OF_KOBJ)
Signature · 1 line
2.39.2
Acked-by Tested-by on v1 1/1
#2 lore raw

Re: [PATCH] of: fix htmldocs build warning

Quoted 8 lines · Stephen Rothwell

Fix this htmldoc build warning:

include/linux/of.h:115: warning: cannot understand function prototype: 'const struct kobj_type of_node_ktype; '

Reported by: Stephen Rothwell <[email protected]>

Fixes 39459ce717b8 ("of: dynamic: add lifecycle docbook info to node creation functions")

Thanks.

After this patch, there is another warning for this function:

../include/linux/of.h:118: warning: Excess function parameter 'phandle_name' description in 'of_node_init'

Quoted 30 lines
---
 include/linux/of.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

This is actually untested, but seems pretty straight forward.

include/linux/of.h +3 -3
index 0af611307db2..814d33f3835a 100644
@@ -100,6 +100,9 @@ struct of_reconfig_data {
 	struct property		*old_prop;
 };
 
+extern const struct kobj_type of_node_ktype;
+extern const struct fwnode_operations of_fwnode_ops;
+
 /**
  * of_node_init - initialize a devicetree node
  * @node: Pointer to device node that has been created by kzalloc()
@@ -111,9 +114,6 @@ struct of_reconfig_data {
  * whether to free the memory will be done by node->release(), which is
  * of_node_release().
  */
-/* initialize a node */
-extern const struct kobj_type of_node_ktype;
-extern const struct fwnode_operations of_fwnode_ops;
 static inline void of_node_init(struct device_node *node)
 {
 #if defined(CONFIG_OF_KOBJ)
Signature · 1 line
~Randy
#3 lore raw

Re: [PATCH] of: fix htmldocs build warning

Hi--

Quoted 4 lines · Randy Dunlap
Quoted 1 line · Stephen Rothwell
Quoted 8 lines
Quoted 7 lines

Fix this htmldoc build warning:

include/linux/of.h:115: warning: cannot understand function prototype: 'const struct kobj_type of_node_ktype; '

Reported by: Stephen Rothwell <[email protected]>

Fixes 39459ce717b8 ("of: dynamic: add lifecycle docbook info to node creation functions")

Can we get Stephen's patch merged, please?
Thanks.

Quoted 40 lines

Thanks.

After this patch, there is another warning for this function:

../include/linux/of.h:118: warning: Excess function parameter 'phandle_name' description in 'of_node_init'

Quoted 30 lines
---
 include/linux/of.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

This is actually untested, but seems pretty straight forward.

include/linux/of.h +3 -3
index 0af611307db2..814d33f3835a 100644
@@ -100,6 +100,9 @@ struct of_reconfig_data {
 	struct property		*old_prop;
 };
 
+extern const struct kobj_type of_node_ktype;
+extern const struct fwnode_operations of_fwnode_ops;
+
 /**
  * of_node_init - initialize a devicetree node
  * @node: Pointer to device node that has been created by kzalloc()
@@ -111,9 +114,6 @@ struct of_reconfig_data {
  * whether to free the memory will be done by node->release(), which is
  * of_node_release().
  */
-/* initialize a node */
-extern const struct kobj_type of_node_ktype;
-extern const struct fwnode_operations of_fwnode_ops;
 static inline void of_node_init(struct device_node *node)
 {
 #if defined(CONFIG_OF_KOBJ)
Signature · 1 line
~Randy
#4 lore raw

PATCH 1/1 of: fix htmldocs build warnings

In reply to Stephen Rothwell

Fix these htmldoc build warnings:

include/linux/of.h:115: warning: cannot understand function prototype: 'const struct kobj_type of_node_ktype; ' include/linux/of.h:118: warning: Excess function parameter 'phandle_name' description in 'of_node_init'

Reported by: Stephen Rothwell <[email protected]> Reported by: Randy Dunlap <[email protected]>

Fixes 39459ce717b8 ("of: dynamic: add lifecycle docbook info to node creation functions")
---
 include/linux/of.h | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Replaces "[PATCH] of: fix htmldocs build warning" and additionally fixes the new warning about phandle that Randy reported.

include/linux/of.h +3 -4
index 9b7a99499ef3..d55dab9ad728 100644
@@ -100,10 +100,12 @@ struct of_reconfig_data {
 	struct property		*old_prop;
 };
 
+extern const struct kobj_type of_node_ktype;
+extern const struct fwnode_operations of_fwnode_ops;
+
 /**
  * of_node_init - initialize a devicetree node
  * @node: Pointer to device node that has been created by kzalloc()
- * @phandle_name: Name of property holding a phandle value
  *
  * On return the device_node refcount is set to one.  Use of_node_put()
  * on @node when done to free the memory allocated for it.  If the node
@@ -111,9 +113,6 @@ struct of_reconfig_data {
  * whether to free the memory will be done by node->release(), which is
  * of_node_release().
  */
-/* initialize a node */
-extern const struct kobj_type of_node_ktype;
-extern const struct fwnode_operations of_fwnode_ops;
 static inline void of_node_init(struct device_node *node)
 {
 #if defined(CONFIG_OF_KOBJ)
Signature · 1 line
2.39.2
Reviewed-by on v1 1/1
#5 lore raw

Re: [PATCH] of: fix htmldocs build warnings

Quoted 9 lines · Stephen Rothwell

Fix these htmldoc build warnings:

include/linux/of.h:115: warning: cannot understand function prototype: 'const struct kobj_type of_node_ktype; ' include/linux/of.h:118: warning: Excess function parameter 'phandle_name' description in 'of_node_init'

Reported by: Stephen Rothwell <[email protected]> Reported by: Randy Dunlap <[email protected]>

Fixes 39459ce717b8 ("of: dynamic: add lifecycle docbook info to node creation functions")

Thanks.

Quoted 35 lines
---
 include/linux/of.h | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Replaces "[PATCH] of: fix htmldocs build warning" and additionally fixes the new warning about phandle that Randy reported.

include/linux/of.h +3 -4
index 9b7a99499ef3..d55dab9ad728 100644
@@ -100,10 +100,12 @@ struct of_reconfig_data {
 	struct property		*old_prop;
 };
 
+extern const struct kobj_type of_node_ktype;
+extern const struct fwnode_operations of_fwnode_ops;
+
 /**
  * of_node_init - initialize a devicetree node
  * @node: Pointer to device node that has been created by kzalloc()
- * @phandle_name: Name of property holding a phandle value
  *
  * On return the device_node refcount is set to one.  Use of_node_put()
  * on @node when done to free the memory allocated for it.  If the node
@@ -111,9 +113,6 @@ struct of_reconfig_data {
  * whether to free the memory will be done by node->release(), which is
  * of_node_release().
  */
-/* initialize a node */
-extern const struct kobj_type of_node_ktype;
-extern const struct fwnode_operations of_fwnode_ops;
 static inline void of_node_init(struct device_node *node)
 {
 #if defined(CONFIG_OF_KOBJ)
Signature · 1 line
~Randy
#6 lore raw

Re: [PATCH] of: fix htmldocs build warnings

Hi Rob,

Quoted 44 lines · On Wed, 22 Mar 2023 11:50:53 -0700 Randy Dunlap <[email protected]> wrote:
Quoted 9 lines · Stephen Rothwell

Fix these htmldoc build warnings:

include/linux/of.h:115: warning: cannot understand function prototype: 'const struct kobj_type of_node_ktype; ' include/linux/of.h:118: warning: Excess function parameter 'phandle_name' description in 'of_node_init'

Reported by: Stephen Rothwell <[email protected]> Reported by: Randy Dunlap <[email protected]>

Fixes 39459ce717b8 ("of: dynamic: add lifecycle docbook info to node creation functions")

Thanks.

Quoted 27 lines
---
 include/linux/of.h | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Replaces "[PATCH] of: fix htmldocs build warning" and additionally fixes the new warning about phandle that Randy reported.

include/linux/of.h +3 -1
index 9b7a99499ef3..d55dab9ad728 100644
@@ -100,10 +100,12 @@ struct of_reconfig_data {
 	struct property		*old_prop;
 };
 
+extern const struct kobj_type of_node_ktype;
+extern const struct fwnode_operations of_fwnode_ops;
+
 /**
  * of_node_init - initialize a devicetree node
  * @node: Pointer to device node that has been created by kzalloc()
- * @phandle_name: Name of property holding a phandle value
  *
  * On return the device_node refcount is set to one.  Use of_node_put()
  * on @node when done to free the memory allocated for it.  If the node
@@ -111,9 +113,6 @@ struct of_reconfig_data {
  * whether to free the memory will be done by node->release(), which is
Quoted 8 lines

include/linux/of.h struct of_reconfig_data { · line 118

Quoted 8 lines
include/linux/of.h +0 -3
  * of_node_release().
  */
-/* initialize a node */
-extern const struct kobj_type of_node_ktype;
-extern const struct fwnode_operations of_fwnode_ops;
 static inline void of_node_init(struct device_node *node)
 {
 #if defined(CONFIG_OF_KOBJ)  

I am still getting the above warnings :-(

Signature · 2 lines
Cheers,
Stephen Rothwell
#7 lore raw

Re: [PATCH] of: fix htmldocs build warnings

In reply to Stephen Rothwell

Hi Rob,

Quoted 47 lines · On Wed, 22 Mar 2023 18:00:32 +1100 Stephen Rothwell <[email protected]>…

Fix these htmldoc build warnings:

include/linux/of.h:115: warning: cannot understand function prototype: 'const struct kobj_type of_node_ktype; ' include/linux/of.h:118: warning: Excess function parameter 'phandle_name' description in 'of_node_init'

Reported by: Stephen Rothwell <[email protected]> Reported by: Randy Dunlap <[email protected]>

Fixes 39459ce717b8 ("of: dynamic: add lifecycle docbook info to node creation functions")
---
 include/linux/of.h | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Replaces "[PATCH] of: fix htmldocs build warning" and additionally fixes the new warning about phandle that Randy reported.

include/linux/of.h +3 -4
index 9b7a99499ef3..d55dab9ad728 100644
@@ -100,10 +100,12 @@ struct of_reconfig_data {
 	struct property		*old_prop;
 };
 
+extern const struct kobj_type of_node_ktype;
+extern const struct fwnode_operations of_fwnode_ops;
+
 /**
  * of_node_init - initialize a devicetree node
  * @node: Pointer to device node that has been created by kzalloc()
- * @phandle_name: Name of property holding a phandle value
  *
  * On return the device_node refcount is set to one.  Use of_node_put()
  * on @node when done to free the memory allocated for it.  If the node
@@ -111,9 +113,6 @@ struct of_reconfig_data {
  * whether to free the memory will be done by node->release(), which is
  * of_node_release().
  */
-/* initialize a node */
-extern const struct kobj_type of_node_ktype;
-extern const struct fwnode_operations of_fwnode_ops;
 static inline void of_node_init(struct device_node *node)
 {
 #if defined(CONFIG_OF_KOBJ)
Signature · 1 line
2.39.2

Any chance if this patch being applied?

Signature · 2 lines
Cheers,
Stephen Rothwell
#8 lore raw

Re: [PATCH] of: fix htmldocs build warnings

Hi all,

Quoted 43 lines · On Thu, 13 Jul 2023 16:10:38 +1000 Stephen Rothwell <[email protected]>…
Quoted 41 lines · On Wed, 22 Mar 2023 18:00:32 +1100 Stephen Rothwell <[email protected]>…

Fix these htmldoc build warnings:

include/linux/of.h:115: warning: cannot understand function prototype: 'const struct kobj_type of_node_ktype; ' include/linux/of.h:118: warning: Excess function parameter 'phandle_name' description in 'of_node_init'

Reported by: Stephen Rothwell <[email protected]> Reported by: Randy Dunlap <[email protected]>

Fixes 39459ce717b8 ("of: dynamic: add lifecycle docbook info to node creation functions")
---
 include/linux/of.h | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Replaces "[PATCH] of: fix htmldocs build warning" and additionally fixes the new warning about phandle that Randy reported.

include/linux/of.h +3 -3
index 9b7a99499ef3..d55dab9ad728 100644
@@ -100,10 +100,12 @@ struct of_reconfig_data {
 	struct property		*old_prop;
 };
 
+extern const struct kobj_type of_node_ktype;
+extern const struct fwnode_operations of_fwnode_ops;
+
 /**
  * of_node_init - initialize a devicetree node
  * @node: Pointer to device node that has been created by kzalloc()
- * @phandle_name: Name of property holding a phandle value
  *
  * On return the device_node refcount is set to one.  Use of_node_put()
  * on @node when done to free the memory allocated for it.  If the node
@@ -111,9 +113,6 @@ struct of_reconfig_data {
  * whether to free the memory will be done by node->release(), which is
  * of_node_release().
  */
-/* initialize a node */
-extern const struct kobj_type of_node_ktype;
Quoted 8 lines
Quoted 6 lines
include/linux/of.h +0 -1
-extern const struct fwnode_operations of_fwnode_ops;
 static inline void of_node_init(struct device_node *node)
 {
 #if defined(CONFIG_OF_KOBJ)
Signature · 1 line
2.39.2  

Any chance if this patch being applied?

Is there something wrong with the patch?

P.S. Rob, should I use your kernel.org address as your linux-next contact?

Signature · 2 lines
Cheers,
Stephen Rothwell
maintainer
#9 lore raw

Re: [PATCH] of: fix htmldocs build warnings

Quoted 55 lines · Stephen Rothwell

Hi all,

Quoted 43 lines · On Thu, 13 Jul 2023 16:10:38 +1000 Stephen Rothwell <[email protected]>…
Quoted 41 lines · On Wed, 22 Mar 2023 18:00:32 +1100 Stephen Rothwell <[email protected]>…

Fix these htmldoc build warnings:

include/linux/of.h:115: warning: cannot understand function prototype: 'const struct kobj_type of_node_ktype; ' include/linux/of.h:118: warning: Excess function parameter 'phandle_name' description in 'of_node_init'

Reported by: Stephen Rothwell <[email protected]> Reported by: Randy Dunlap <[email protected]>

Fixes 39459ce717b8 ("of: dynamic: add lifecycle docbook info to node creation functions")
---
 include/linux/of.h | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Replaces "[PATCH] of: fix htmldocs build warning" and additionally fixes the new warning about phandle that Randy reported.

include/linux/of.h +3 -3
index 9b7a99499ef3..d55dab9ad728 100644
@@ -100,10 +100,12 @@ struct of_reconfig_data {
 	struct property		*old_prop;
 };
 
+extern const struct kobj_type of_node_ktype;
+extern const struct fwnode_operations of_fwnode_ops;
+
 /**
  * of_node_init - initialize a devicetree node
  * @node: Pointer to device node that has been created by kzalloc()
- * @phandle_name: Name of property holding a phandle value
  *
  * On return the device_node refcount is set to one.  Use of_node_put()
  * on @node when done to free the memory allocated for it.  If the node
@@ -111,9 +113,6 @@ struct of_reconfig_data {
  * whether to free the memory will be done by node->release(), which is
  * of_node_release().
  */
-/* initialize a node */
-extern const struct kobj_type of_node_ktype;
Quoted 8 lines
Quoted 6 lines
include/linux/of.h +0 -1
-extern const struct fwnode_operations of_fwnode_ops;
 static inline void of_node_init(struct device_node *node)
 {
 #if defined(CONFIG_OF_KOBJ)
Signature · 1 line
2.39.2  

Any chance if this patch being applied?

Quoted 1 line

Is there something wrong with the patch?

Sorry, missed this one. Now applied. If it's not sent to DT list and into PW, then it's a gamble when/if I see it.

Quoted 2 lines

P.S. Rob, should I use your kernel.org address as your linux-next contact?

Yes.

Rob