Skip to contentSkip to conversation

coresight: cti: Replace inclusion by struct fwnode_handle forward declaration

PATCH Applied Andy Shevchenko 3 participants 6 messages Mar 31, 2025 – May 8, 2025

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

PATCH 1/1 coresight: cti: Replace inclusion by struct fwnode_handle forward declaration

The fwnode.h is not supposed to be used by the drivers as it has the definitions for the core parts for different device property provider implementations. Drop it.

Since the code wants to use the pointer to the struct fwnode_handle the forward declaration is provided.

---
 drivers/hwtracing/coresight/coresight-cti.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/hwtracing/coresight/coresight-cti.h +2 -1
index 16e310e7e9d4..8362a47c939c 100644
@@ -9,7 +9,6 @@
 
 #include <linux/coresight.h>
 #include <linux/device.h>
-#include <linux/fwnode.h>
 #include <linux/list.h>
 #include <linux/spinlock.h>
 #include <linux/sysfs.h>
@@ -17,6 +16,8 @@
 
 #include "coresight-priv.h"
 
+struct fwnode_handle;
+
 /*
  * Device registers
  * 0x000 - 0x144: CTI programming and status
Signature · 1 line
2.47.2
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 25 lines · Andy Shevchenko

The fwnode.h is not supposed to be used by the drivers as it has the definitions for the core parts for different device property provider implementations. Drop it.

Since the code wants to use the pointer to the struct fwnode_handle the forward declaration is provided.

---
  drivers/hwtracing/coresight/coresight-cti.h | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/hwtracing/coresight/coresight-cti.h +0 -1
index 16e310e7e9d4..8362a47c939c 100644
@@ -9,7 +9,6 @@
 
  #include <linux/coresight.h>
  #include <linux/device.h>
-#include <linux/fwnode.h>
  #include <linux/list.h>
  #include <linux/spinlock.h>
  #include <linux/sysfs.h>

drivers/hwtracing/coresight/coresight-cti.h line 23

Quoted 8 lines
drivers/hwtracing/coresight/coresight-cti.h +2 -0
@@ -17,6 +16,8 @@
 
  #include "coresight-priv.h"
 
+struct fwnode_handle;
+
  /*
   * Device registers
   * 0x000 - 0x144: CTI programming and status
maintainer
#3 lore raw
Quoted 7 lines · Andy Shevchenko
Quoted 3 lines · James Clark

On 31/03/2025 8:14 am, Andy Shevchenko wrote:

Thank you! Can it be applied now?

I will queue this via coresight tree, for v6.16

Cheers
Suzuki

#4 lore raw
Quoted 9 lines · Suzuki K Poulose
Quoted 6 lines · Andy Shevchenko
Quoted 3 lines · James Clark

On 31/03/2025 8:14 am, Andy Shevchenko wrote:

Thank you! Can it be applied now?

I will queue this via coresight tree, for v6.16

I still don't see it in Linux Next, what did I miss?

Signature · 2 lines
With Best Regards,
Andy Shevchenko
maintainer Applied
#5 lore raw
In reply to Andy Shevchenko
Quoted 8 lines · Andy Shevchenko

The fwnode.h is not supposed to be used by the drivers as it has the definitions for the core parts for different device property provider implementations. Drop it.

Since the code wants to use the pointer to the struct fwnode_handle the forward declaration is provided.

[...]

Applied, thanks!

[1/1] coresight: cti: Replace inclusion by struct fwnode_handle forward declaration

      https://git.kernel.org/coresight/c/aad548a9

Best regards,

Signature · 1 line
Suzuki K Poulose <[email protected]>