linux-next: manual merge of the kunit-next tree with the drm-xe tree

Stephen Rothwell posted 1 patch 3 weeks, 3 days ago
There is a newer version of this series
drivers/gpu/drm/xe/tests/xe_pci.c      | 5 +++--
drivers/gpu/drm/xe/tests/xe_pci_test.h | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
linux-next: manual merge of the kunit-next tree with the drm-xe tree
Posted by Stephen Rothwell 3 weeks, 3 days ago
Hi all,

After merging the kunit-next tree, today's linux-next build (x86_64
allmodconfig) failed like this:

In file included from drivers/gpu/drm/xe/xe_pci.c:1104:
drivers/gpu/drm/xe/tests/xe_pci.c: In function 'xe_pci_fake_data_gen_params':
drivers/gpu/drm/xe/tests/xe_pci.c:80:36: error: passing argument 1 of 'platform_gen_params' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
   80 |         return platform_gen_params(prev, desc);
      |                                    ^~~~
In file included from include/kunit/static_stub.h:18,
                 from drivers/gpu/drm/xe/xe_pci.c:8:
include/kunit/test.h:1729:60: note: expected 'struct kunit *' but argument is of type 'const void *'
 1729 |         static const void *name##_gen_params(struct kunit *test,                                \
      |                                              ~~~~~~~~~~~~~~^~~~
drivers/gpu/drm/xe/tests/xe_pci.c:65:1: note: in expansion of macro 'KUNIT_ARRAY_PARAM'
   65 | KUNIT_ARRAY_PARAM(platform, cases, xe_pci_fake_data_desc);
      | ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/xe/tests/xe_pci.c:80:16: error: too few arguments to function 'platform_gen_params'
   80 |         return platform_gen_params(prev, desc);
      |                ^~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/xe/tests/xe_pci.c:65:19: note: declared here
   65 | KUNIT_ARRAY_PARAM(platform, cases, xe_pci_fake_data_desc);
      |                   ^~~~~~~~
include/kunit/test.h:1729:28: note: in definition of macro 'KUNIT_ARRAY_PARAM'
 1729 |         static const void *name##_gen_params(struct kunit *test,                                \
      |                            ^~~~
drivers/gpu/drm/xe/tests/xe_pci.c:81:1: error: control reaches end of non-void function [-Werror=return-type]
   81 | }
      | ^
cc1: all warnings being treated as errors

Caused by commit

  b9a214b5f6aa ("kunit: Pass parameterized test context to generate_params()")

interacting with comit

  a9c8517058cc ("drm/xe/kunit: Promote fake platform parameter list")

from the drm-xe tree.

I have applied the following merge fix patch.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 8 Sep 2025 17:15:21 +1000
Subject: [PATCH] fix up for "kunit: Pass parameterized test context to
 generate_params()"

interacting with "drm/xe/kunit: Promote fake platform parameter list"
from the drm-xe tree.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/gpu/drm/xe/tests/xe_pci.c      | 5 +++--
 drivers/gpu/drm/xe/tests/xe_pci_test.h | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/xe/tests/xe_pci.c b/drivers/gpu/drm/xe/tests/xe_pci.c
index e29ec1ce7231..c789bfb8af96 100644
--- a/drivers/gpu/drm/xe/tests/xe_pci.c
+++ b/drivers/gpu/drm/xe/tests/xe_pci.c
@@ -66,6 +66,7 @@ KUNIT_ARRAY_PARAM(platform, cases, xe_pci_fake_data_desc);
 
 /**
  * xe_pci_fake_data_gen_params - Generate struct xe_pci_fake_data parameters
+ * @test: a test pointer
  * @prev: the pointer to the previous parameter to iterate from or NULL
  * @desc: output buffer with minimum size of KUNIT_PARAM_DESC_SIZE
  *
@@ -75,9 +76,9 @@ KUNIT_ARRAY_PARAM(platform, cases, xe_pci_fake_data_desc);
  *
  * Return: pointer to the next parameter or NULL if no more parameters
  */
-const void *xe_pci_fake_data_gen_params(const void *prev, char *desc)
+const void *xe_pci_fake_data_gen_params(struct kunit *test, const void *prev, char *desc)
 {
-	return platform_gen_params(prev, desc);
+	return platform_gen_params(test, prev, desc);
 }
 EXPORT_SYMBOL_IF_KUNIT(xe_pci_fake_data_gen_params);
 
diff --git a/drivers/gpu/drm/xe/tests/xe_pci_test.h b/drivers/gpu/drm/xe/tests/xe_pci_test.h
index e2f8d65e9e33..30505d1cbefc 100644
--- a/drivers/gpu/drm/xe/tests/xe_pci_test.h
+++ b/drivers/gpu/drm/xe/tests/xe_pci_test.h
@@ -25,7 +25,7 @@ struct xe_pci_fake_data {
 };
 
 int xe_pci_fake_device_init(struct xe_device *xe);
-const void *xe_pci_fake_data_gen_params(const void *prev, char *desc);
+const void *xe_pci_fake_data_gen_params(struct kunit *test, const void *prev, char *desc);
 void xe_pci_fake_data_desc(const struct xe_pci_fake_data *param, char *desc);
 
 const void *xe_pci_graphics_ip_gen_param(struct kunit *test, const void *prev, char *desc);
-- 
2.51.0

-- 
Cheers,
Stephen Rothwell
Re: linux-next: manual merge of the kunit-next tree with the drm-xe tree
Posted by Lucas De Marchi 3 weeks, 3 days ago
On Mon, Sep 08, 2025 at 05:29:38PM +1000, Stephen Rothwell wrote:
>Hi all,
>
>After merging the kunit-next tree, today's linux-next build (x86_64
>allmodconfig) failed like this:
>
>In file included from drivers/gpu/drm/xe/xe_pci.c:1104:
>drivers/gpu/drm/xe/tests/xe_pci.c: In function 'xe_pci_fake_data_gen_params':
>drivers/gpu/drm/xe/tests/xe_pci.c:80:36: error: passing argument 1 of 'platform_gen_params' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
>   80 |         return platform_gen_params(prev, desc);
>      |                                    ^~~~
>In file included from include/kunit/static_stub.h:18,
>                 from drivers/gpu/drm/xe/xe_pci.c:8:
>include/kunit/test.h:1729:60: note: expected 'struct kunit *' but argument is of type 'const void *'
> 1729 |         static const void *name##_gen_params(struct kunit *test,                                \
>      |                                              ~~~~~~~~~~~~~~^~~~
>drivers/gpu/drm/xe/tests/xe_pci.c:65:1: note: in expansion of macro 'KUNIT_ARRAY_PARAM'
>   65 | KUNIT_ARRAY_PARAM(platform, cases, xe_pci_fake_data_desc);
>      | ^~~~~~~~~~~~~~~~~
>drivers/gpu/drm/xe/tests/xe_pci.c:80:16: error: too few arguments to function 'platform_gen_params'
>   80 |         return platform_gen_params(prev, desc);
>      |                ^~~~~~~~~~~~~~~~~~~
>drivers/gpu/drm/xe/tests/xe_pci.c:65:19: note: declared here
>   65 | KUNIT_ARRAY_PARAM(platform, cases, xe_pci_fake_data_desc);
>      |                   ^~~~~~~~
>include/kunit/test.h:1729:28: note: in definition of macro 'KUNIT_ARRAY_PARAM'
> 1729 |         static const void *name##_gen_params(struct kunit *test,                                \
>      |                            ^~~~
>drivers/gpu/drm/xe/tests/xe_pci.c:81:1: error: control reaches end of non-void function [-Werror=return-type]
>   81 | }
>      | ^
>cc1: all warnings being treated as errors
>
>Caused by commit
>
>  b9a214b5f6aa ("kunit: Pass parameterized test context to generate_params()")
>
>interacting with comit
>
>  a9c8517058cc ("drm/xe/kunit: Promote fake platform parameter list")
>
>from the drm-xe tree.
>
>I have applied the following merge fix patch.
>
>From: Stephen Rothwell <sfr@canb.auug.org.au>
>Date: Mon, 8 Sep 2025 17:15:21 +1000
>Subject: [PATCH] fix up for "kunit: Pass parameterized test context to
> generate_params()"
>
>interacting with "drm/xe/kunit: Promote fake platform parameter list"
>from the drm-xe tree.
>
>Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
>---
> drivers/gpu/drm/xe/tests/xe_pci.c      | 5 +++--
> drivers/gpu/drm/xe/tests/xe_pci_test.h | 2 +-
> 2 files changed, 4 insertions(+), 3 deletions(-)
>
>diff --git a/drivers/gpu/drm/xe/tests/xe_pci.c b/drivers/gpu/drm/xe/tests/xe_pci.c
>index e29ec1ce7231..c789bfb8af96 100644
>--- a/drivers/gpu/drm/xe/tests/xe_pci.c
>+++ b/drivers/gpu/drm/xe/tests/xe_pci.c
>@@ -66,6 +66,7 @@ KUNIT_ARRAY_PARAM(platform, cases, xe_pci_fake_data_desc);
>
> /**
>  * xe_pci_fake_data_gen_params - Generate struct xe_pci_fake_data parameters
>+ * @test: a test pointer

to make this the same as other functions in
drivers/gpu/drm/xe/tests/xe_kunit_helpers.c, I'd document this as:

@test: the &kunit where this fake &xe_device will be used

thanks for the fixup

Lucas De Marchi

>  * @prev: the pointer to the previous parameter to iterate from or NULL
>  * @desc: output buffer with minimum size of KUNIT_PARAM_DESC_SIZE
>  *
>@@ -75,9 +76,9 @@ KUNIT_ARRAY_PARAM(platform, cases, xe_pci_fake_data_desc);
>  *
>  * Return: pointer to the next parameter or NULL if no more parameters
>  */
>-const void *xe_pci_fake_data_gen_params(const void *prev, char *desc)
>+const void *xe_pci_fake_data_gen_params(struct kunit *test, const void *prev, char *desc)
> {
>-	return platform_gen_params(prev, desc);
>+	return platform_gen_params(test, prev, desc);
> }
> EXPORT_SYMBOL_IF_KUNIT(xe_pci_fake_data_gen_params);
>
>diff --git a/drivers/gpu/drm/xe/tests/xe_pci_test.h b/drivers/gpu/drm/xe/tests/xe_pci_test.h
>index e2f8d65e9e33..30505d1cbefc 100644
>--- a/drivers/gpu/drm/xe/tests/xe_pci_test.h
>+++ b/drivers/gpu/drm/xe/tests/xe_pci_test.h
>@@ -25,7 +25,7 @@ struct xe_pci_fake_data {
> };
>
> int xe_pci_fake_device_init(struct xe_device *xe);
>-const void *xe_pci_fake_data_gen_params(const void *prev, char *desc);
>+const void *xe_pci_fake_data_gen_params(struct kunit *test, const void *prev, char *desc);
> void xe_pci_fake_data_desc(const struct xe_pci_fake_data *param, char *desc);
>
> const void *xe_pci_graphics_ip_gen_param(struct kunit *test, const void *prev, char *desc);
>-- 
>2.51.0
>
>-- 
>Cheers,
>Stephen Rothwell
Re: linux-next: manual merge of the kunit-next tree with the drm-xe tree
Posted by Stephen Rothwell 3 weeks, 3 days ago
Hi Lucas,

On Mon, 8 Sep 2025 08:26:37 -0500 Lucas De Marchi <lucas.demarchi@intel.com> wrote:
>
> >diff --git a/drivers/gpu/drm/xe/tests/xe_pci.c b/drivers/gpu/drm/xe/tests/xe_pci.c
> >index e29ec1ce7231..c789bfb8af96 100644
> >--- a/drivers/gpu/drm/xe/tests/xe_pci.c
> >+++ b/drivers/gpu/drm/xe/tests/xe_pci.c
> >@@ -66,6 +66,7 @@ KUNIT_ARRAY_PARAM(platform, cases, xe_pci_fake_data_desc);
> >
> > /**
> >  * xe_pci_fake_data_gen_params - Generate struct xe_pci_fake_data parameters
> >+ * @test: a test pointer  
> 
> to make this the same as other functions in
> drivers/gpu/drm/xe/tests/xe_kunit_helpers.c, I'd document this as:
> 
> @test: the &kunit where this fake &xe_device will be used

Thanks, I have done that.

-- 
Cheers,
Stephen Rothwell