Skip to contentSkip to conversation

cxl: Include range.h in cxl.h

PATCH Applied Nathan Chancellor 5 participants 8 messages Jul 1, 2025 CXL

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cxl: Include range.h in cxl.h

After commit aefeb286b960 ("libnvdimm: Don't use "proxy" headers"), range.h may not be implicitly included, resulting in a build error:

In file included from drivers/cxl/core/features.c:8:
drivers/cxl/cxl.h:365:22: error: field 'hpa_range' has incomplete type

    365 |         struct range hpa_range;
        |                      ^~~~~~~~~
  drivers/cxl/cxl.h:562:22: error: field 'hpa_range' has incomplete type
    562 |         struct range hpa_range;
        |                      ^~~~~~~~~
  drivers/cxl/cxl.h:570:22: error: field 'hpa_range' has incomplete type
    570 |         struct range hpa_range;
        |                      ^~~~~~~~~
  drivers/cxl/cxl.h:803:22: error: array type has incomplete element type 'struct range'
    803 |         struct range dvsec_range[2];
        |                      ^~~~~~~~~~~

Include range.h in cxl.h explicitly to clear up the errors.

Fixes aefeb286b960 ("libnvdimm: Don't use "proxy" headers")
---
 drivers/cxl/cxl.h | 1 +
 1 file changed, 1 insertion(+)
drivers/cxl/cxl.h +1 -0
index 3f1695c96abc..b941ff94fe0a 100644
@@ -11,6 +11,7 @@
 #include <linux/log2.h>
 #include <linux/node.h>
 #include <linux/io.h>
+#include <linux/range.h>
 
 extern const struct nvdimm_security_ops *cxl_security_ops;
 

---
base-commit: aefeb286b960a0629273d1dc809ea36754f42d98
change-id: 20250701-cxl-fix-struct-range-error-8475cbbf3358

Best regards,

Signature · 1 line
Nathan Chancellor <[email protected]>
Reviewed-by on v1 1/1
#1 lore raw
Quoted 17 lines · On Tue, 01 Jul 2025 07:33:31 -0700 Nathan Chancellor <[email protected]> wrote:

After commit aefeb286b960 ("libnvdimm: Don't use "proxy" headers"), range.h may not be implicitly included, resulting in a build error:

In file included from drivers/cxl/core/features.c:8:
drivers/cxl/cxl.h:365:22: error: field 'hpa_range' has incomplete type

    365 |         struct range hpa_range;
        |                      ^~~~~~~~~
  drivers/cxl/cxl.h:562:22: error: field 'hpa_range' has incomplete type
    562 |         struct range hpa_range;
        |                      ^~~~~~~~~
  drivers/cxl/cxl.h:570:22: error: field 'hpa_range' has incomplete type
    570 |         struct range hpa_range;
        |                      ^~~~~~~~~
  drivers/cxl/cxl.h:803:22: error: array type has incomplete element type 'struct range'
    803 |         struct range dvsec_range[2];
        |                      ^~~~~~~~~~~
Quoted 4 lines

Include range.h in cxl.h explicitly to clear up the errors.

Fixes aefeb286b960 ("libnvdimm: Don't use "proxy" headers")
maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Nathan Chancellor
Quoted 17 lines · Nathan Chancellor

After commit aefeb286b960 ("libnvdimm: Don't use "proxy" headers"), range.h may not be implicitly included, resulting in a build error:

In file included from drivers/cxl/core/features.c:8:
drivers/cxl/cxl.h:365:22: error: field 'hpa_range' has incomplete type

    365 |         struct range hpa_range;
        |                      ^~~~~~~~~
  drivers/cxl/cxl.h:562:22: error: field 'hpa_range' has incomplete type
    562 |         struct range hpa_range;
        |                      ^~~~~~~~~
  drivers/cxl/cxl.h:570:22: error: field 'hpa_range' has incomplete type
    570 |         struct range hpa_range;
        |                      ^~~~~~~~~
  drivers/cxl/cxl.h:803:22: error: array type has incomplete element type 'struct range'
    803 |         struct range dvsec_range[2];
        |                      ^~~~~~~~~~~
Quoted 4 lines

Include range.h in cxl.h explicitly to clear up the errors.

Fixes aefeb286b960 ("libnvdimm: Don't use "proxy" headers")
Quoted 26 lines
---
 drivers/cxl/cxl.h | 1 +
 1 file changed, 1 insertion(+)
drivers/cxl/cxl.h +1 -1
index 3f1695c96abc..b941ff94fe0a 100644
@@ -11,6 +11,7 @@
 #include <linux/log2.h>
 #include <linux/node.h>
 #include <linux/io.h>
+#include <linux/range.h>
 
 extern const struct nvdimm_security_ops *cxl_security_ops;
 
 
---

base-commit: aefeb286b960a0629273d1dc809ea36754f42d98
change-id: 20250701-cxl-fix-struct-range-error-8475cbbf3358

Best regards,

Signature · 1 line
Nathan Chancellor <[email protected]>
#3 lore raw
In reply to Nathan Chancellor
Quoted 2 lines · Nathan Chancellor

After commit aefeb286b960 ("libnvdimm: Don't use "proxy" headers"), range.h may not be implicitly included, resulting in a build error:

Dave J., I'll pick this up since the nvdimm change was pushed through libnvdimm.

That said, I'm not seeing this issue. What config caught this?

Ira

Quoted 45 lines

In file included from drivers/cxl/core/features.c:8:
drivers/cxl/cxl.h:365:22: error: field 'hpa_range' has incomplete type

    365 |         struct range hpa_range;
        |                      ^~~~~~~~~
  drivers/cxl/cxl.h:562:22: error: field 'hpa_range' has incomplete type
    562 |         struct range hpa_range;
        |                      ^~~~~~~~~
  drivers/cxl/cxl.h:570:22: error: field 'hpa_range' has incomplete type
    570 |         struct range hpa_range;
        |                      ^~~~~~~~~
  drivers/cxl/cxl.h:803:22: error: array type has incomplete element type 'struct range'
    803 |         struct range dvsec_range[2];
        |                      ^~~~~~~~~~~

Include range.h in cxl.h explicitly to clear up the errors.

Fixes aefeb286b960 ("libnvdimm: Don't use "proxy" headers")
---
 drivers/cxl/cxl.h | 1 +
 1 file changed, 1 insertion(+)
drivers/cxl/cxl.h +1 -1
index 3f1695c96abc..b941ff94fe0a 100644
@@ -11,6 +11,7 @@
 #include <linux/log2.h>
 #include <linux/node.h>
 #include <linux/io.h>
+#include <linux/range.h>
 
 extern const struct nvdimm_security_ops *cxl_security_ops;
 
 
---

base-commit: aefeb286b960a0629273d1dc809ea36754f42d98
change-id: 20250701-cxl-fix-struct-range-error-8475cbbf3358

Best regards,

Signature · 1 line
Nathan Chancellor <[email protected]>
#4 lore raw
Quoted 5 lines · Ira Weiny
Quoted 2 lines · Nathan Chancellor

After commit aefeb286b960 ("libnvdimm: Don't use "proxy" headers"), range.h may not be implicitly included, resulting in a build error:

That said, I'm not seeing this issue. What config caught this?

Fedora's aarch64 configuration [1] is where I initially noticed this. Fedora's rpm site seems to be under the weather for me but I have it mirrored [2] for my own test setup.

[1]: https://src.fedoraproject.org/rpms/kernel/raw/rawhide/f/kernel-aarch64-fedora.config
[2]: https://github.com/nathanchance/llvm-kernel-testing/raw/refs/heads/main/configs/fedora/aarch64.config

Cheers,
Nathan

Reviewed-by
#5 lore raw
Quoted 10 lines · Nathan Chancellor
Quoted 5 lines · Ira Weiny
Quoted 2 lines · Nathan Chancellor

After commit aefeb286b960 ("libnvdimm: Don't use "proxy" headers"), range.h may not be implicitly included, resulting in a build error:

That said, I'm not seeing this issue. What config caught this?

Fedora's aarch64 configuration [1] is where I initially noticed this. Fedora's rpm site seems to be under the weather for me but I have it mirrored [2] for my own test setup.

Ah, I suspected it was a non-x86 build.

Dave, I'll pull this in right now.

Thanks,
Ira

Quoted 7 lines

[1]: https://src.fedoraproject.org/rpms/kernel/raw/rawhide/f/kernel-aarch64-fedora.config
[2]: https://github.com/nathanchance/llvm-kernel-testing/raw/refs/heads/main/configs/fedora/aarch64.config

Cheers,
Nathan

#6 lore raw
Quoted 12 lines · Ira Weiny
Quoted 10 lines · Nathan Chancellor
Quoted 5 lines · Ira Weiny
Quoted 2 lines · Nathan Chancellor

After commit aefeb286b960 ("libnvdimm: Don't use "proxy" headers"), range.h may not be implicitly included, resulting in a build error:

That said, I'm not seeing this issue. What config caught this?

Fedora's aarch64 configuration [1] is where I initially noticed this. Fedora's rpm site seems to be under the weather for me but I have it mirrored [2] for my own test setup.

Quoted 5 lines

Ah, I suspected it was a non-x86 build.

Dave, I'll pull this in right now.

Thanks, I haven't seen issues and 0-day haven't given any (bad) report so far.

Quoted 2 lines
Quoted 2 lines

[1]: https://src.fedoraproject.org/rpms/kernel/raw/rawhide/f/kernel-aarch64-fedora.config
[2]: https://github.com/nathanchance/llvm-kernel-testing/raw/refs/heads/main/configs/fedora/aarch64.config

Signature · 2 lines
With Best Regards,
Andy Shevchenko
Applied
#7 lore raw
In reply to Nathan Chancellor
Quoted 17 lines · Nathan Chancellor

After commit aefeb286b960 ("libnvdimm: Don't use "proxy" headers"), range.h may not be implicitly included, resulting in a build error:

In file included from drivers/cxl/core/features.c:8:
drivers/cxl/cxl.h:365:22: error: field 'hpa_range' has incomplete type

    365 |         struct range hpa_range;
        |                      ^~~~~~~~~
  drivers/cxl/cxl.h:562:22: error: field 'hpa_range' has incomplete type
    562 |         struct range hpa_range;
        |                      ^~~~~~~~~
  drivers/cxl/cxl.h:570:22: error: field 'hpa_range' has incomplete type
    570 |         struct range hpa_range;
        |                      ^~~~~~~~~
  drivers/cxl/cxl.h:803:22: error: array type has incomplete element type 'struct range'
    803 |         struct range dvsec_range[2];
        |                      ^~~~~~~~~~~
Quoted 1 line

[...]

Applied, thanks!

[1/1] cxl: Include range.h in cxl.h

      commit: 9f97e61bde6a91a429f48da1a461488a15b01813

Best regards,

Signature · 1 line
Ira Weiny <[email protected]>