diff mbox series

[ndctl] cxl/json: remove prefix from tracefs.h #include

Message ID 20250209180348.1773179-1-alison.schofield@intel.com (mailing list archive)
State New
Headers show
Series [ndctl] cxl/json: remove prefix from tracefs.h #include | expand

Commit Message

Alison Schofield Feb. 9, 2025, 6:03 p.m. UTC
From: Michal Suchanek <msuchanek@suse.de>

Distros vary on whether tracefs.h is placed in {prefix}/libtracefs/
or {prefix}/tracefs/. Since the library ships with pkgconfig info
to determine the exact include path the #include statement can drop
the tracefs/ prefix.

This was previously found and fixed elsewhere:
a59866328ec5 ("cxl/monitor: fix include paths for tracefs and traceevent")
but was introduced anew with cxl media-error support in ndctl v80.

Reposted here from github pull request:
https://github.com/pmem/ndctl/pull/268/

[ alison: commit msg and log edits ]

Fixes: 9873123fce03 ("cxl/list: collect and parse media_error records")
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Signed-off-by: Alison Schofield <alison.schofield@intel.com>
---
 cxl/json.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


base-commit: 04815e5f8b87e02a4fb5a61aeebaa5cad25a15c3

Comments

Marc Herbert Feb. 11, 2025, 5:14 p.m. UTC | #1
On 2025-02-09 10:03, alison.schofield@intel.com wrote:
> From: Michal Suchanek <msuchanek@suse.de>
> 
> Distros vary on whether tracefs.h is placed in {prefix}/libtracefs/
> or {prefix}/tracefs/. Since the library ships with pkgconfig info
> to determine the exact include path the #include statement can drop
> the tracefs/ prefix.
> 
> This was previously found and fixed elsewhere:
> a59866328ec5 ("cxl/monitor: fix include paths for tracefs and traceevent")
> but was introduced anew with cxl media-error support in ndctl v80.
> 
> Reposted here from github pull request:
> https://github.com/pmem/ndctl/pull/268/
> 
> [ alison: commit msg and log edits ]
> 
> Fixes: 9873123fce03 ("cxl/list: collect and parse media_error records")
> Signed-off-by: Michal Suchanek <msuchanek@suse.de>
> Signed-off-by: Alison Schofield <alison.schofield@intel.com>
> ---
>  cxl/json.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Marc Herbert <marc.herbert@intel.com>
 
> diff --git a/cxl/json.c b/cxl/json.c
> index 5066d3bed13f..e65bd803b706 100644
> --- a/cxl/json.c
> +++ b/cxl/json.c
> @@ -9,7 +9,7 @@
>  #include <json-c/json.h>
>  #include <json-c/printbuf.h>
>  #include <ccan/short_types/short_types.h>
> -#include <tracefs/tracefs.h>
> +#include <tracefs.h>
>  
>  #include "filter.h"
>  #include "json.h"
> 
> base-commit: 04815e5f8b87e02a4fb5a61aeebaa5cad25a15c3
Dave Jiang Feb. 12, 2025, 4:11 p.m. UTC | #2
On 2/9/25 11:03 AM, alison.schofield@intel.com wrote:
> From: Michal Suchanek <msuchanek@suse.de>
> 
> Distros vary on whether tracefs.h is placed in {prefix}/libtracefs/
> or {prefix}/tracefs/. Since the library ships with pkgconfig info
> to determine the exact include path the #include statement can drop
> the tracefs/ prefix.
> 
> This was previously found and fixed elsewhere:
> a59866328ec5 ("cxl/monitor: fix include paths for tracefs and traceevent")
> but was introduced anew with cxl media-error support in ndctl v80.
> 
> Reposted here from github pull request:
> https://github.com/pmem/ndctl/pull/268/
> 
> [ alison: commit msg and log edits ]
> 
> Fixes: 9873123fce03 ("cxl/list: collect and parse media_error records")
> Signed-off-by: Michal Suchanek <msuchanek@suse.de>
> Signed-off-by: Alison Schofield <alison.schofield@intel.com>

Reviewed-by: Dave Jiang <dave.jiang@intel.com>
> ---
>  cxl/json.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/cxl/json.c b/cxl/json.c
> index 5066d3bed13f..e65bd803b706 100644
> --- a/cxl/json.c
> +++ b/cxl/json.c
> @@ -9,7 +9,7 @@
>  #include <json-c/json.h>
>  #include <json-c/printbuf.h>
>  #include <ccan/short_types/short_types.h>
> -#include <tracefs/tracefs.h>
> +#include <tracefs.h>
>  
>  #include "filter.h"
>  #include "json.h"
> 
> base-commit: 04815e5f8b87e02a4fb5a61aeebaa5cad25a15c3
diff mbox series

Patch

diff --git a/cxl/json.c b/cxl/json.c
index 5066d3bed13f..e65bd803b706 100644
--- a/cxl/json.c
+++ b/cxl/json.c
@@ -9,7 +9,7 @@ 
 #include <json-c/json.h>
 #include <json-c/printbuf.h>
 #include <ccan/short_types/short_types.h>
-#include <tracefs/tracefs.h>
+#include <tracefs.h>
 
 #include "filter.h"
 #include "json.h"