public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
* linux-next: manual merge of the kunit-next tree with the drm-xe tree
@ 2025-09-08  7:29 Stephen Rothwell
  2025-09-08 13:26 ` Lucas De Marchi
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2025-09-08  7:29 UTC (permalink / raw)
  To: Shuah Khan, Lucas De Marchi, Thomas Hellström
  Cc: Michal Wajdeczko, David Gow, Marie Zhussupova, DRM XE List,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 4401 bytes --]

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

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: linux-next: manual merge of the kunit-next tree with the drm-xe tree
  2025-09-08  7:29 linux-next: manual merge of the kunit-next tree with the drm-xe tree Stephen Rothwell
@ 2025-09-08 13:26 ` Lucas De Marchi
  2025-09-08 22:33   ` Stephen Rothwell
  0 siblings, 1 reply; 4+ messages in thread
From: Lucas De Marchi @ 2025-09-08 13:26 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Shuah Khan, Thomas Hellström, Michal Wajdeczko, David Gow,
	Marie Zhussupova, DRM XE List, Linux Kernel Mailing List,
	Linux Next Mailing List

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



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linux-next: manual merge of the kunit-next tree with the drm-xe tree
  2025-09-08 13:26 ` Lucas De Marchi
@ 2025-09-08 22:33   ` Stephen Rothwell
  0 siblings, 0 replies; 4+ messages in thread
From: Stephen Rothwell @ 2025-09-08 22:33 UTC (permalink / raw)
  To: Lucas De Marchi
  Cc: Shuah Khan, Thomas Hellström, Michal Wajdeczko, David Gow,
	Marie Zhussupova, DRM XE List, Linux Kernel Mailing List,
	Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 778 bytes --]

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

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* linux-next: manual merge of the kunit-next tree with the drm-xe tree
@ 2025-09-18 14:39 Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2025-09-18 14:39 UTC (permalink / raw)
  To: Shuah Khan
  Cc: David Gow, Linux Kernel Mailing List, Linux Next Mailing List,
	Marie Zhussupova, Michal Wajdeczko

[-- Attachment #1: Type: text/plain, Size: 2365 bytes --]

Hi all,

Today's linux-next merge of the kunit-next tree got a conflict in:

  drivers/gpu/drm/xe/tests/xe_pci.c

between commit:

  5bb5258e357eb ("drm/xe/tests: Add pre-GMDID IP descriptors to param generators")

from the drm-xe tree and commit:

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

from the kunit-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --cc drivers/gpu/drm/xe/tests/xe_pci.c
index aa29ac759d5db,f707e0a542959..0000000000000
--- a/drivers/gpu/drm/xe/tests/xe_pci.c
+++ b/drivers/gpu/drm/xe/tests/xe_pci.c
@@@ -251,16 -44,9 +251,16 @@@ KUNIT_ARRAY_PARAM(pci_id, pciidlist, xe
   *
   * Return: pointer to the next parameter or NULL if no more parameters
   */
- const void *xe_pci_graphics_ip_gen_param(const void *prev, char *desc)
+ const void *xe_pci_graphics_ip_gen_param(struct kunit *test, const void *prev, char *desc)
  {
- 	const void *next = pre_gmdid_graphics_ip_gen_params(prev, desc);
++	const void *next = pre_gmdid_graphics_ip_gen_params(test, prev, desc);
 +
 +	if (next)
 +		return next;
 +	if (is_insidevar(prev, pre_gmdid_graphics_ips))
 +		prev = NULL;
 +
- 	return graphics_ip_gen_params(prev, desc);
+ 	return graphics_ip_gen_params(test, prev, desc);
  }
  EXPORT_SYMBOL_IF_KUNIT(xe_pci_graphics_ip_gen_param);
  
@@@ -275,16 -61,9 +275,16 @@@
   *
   * Return: pointer to the next parameter or NULL if no more parameters
   */
- const void *xe_pci_media_ip_gen_param(const void *prev, char *desc)
+ const void *xe_pci_media_ip_gen_param(struct kunit *test, const void *prev, char *desc)
  {
- 	const void *next = pre_gmdid_media_ip_gen_params(prev, desc);
++	const void *next = pre_gmdid_media_ip_gen_params(test, prev, desc);
 +
 +	if (next)
 +		return next;
 +	if (is_insidevar(prev, pre_gmdid_media_ips))
 +		prev = NULL;
 +
- 	return media_ip_gen_params(prev, desc);
+ 	return media_ip_gen_params(test, prev, desc);
  }
  EXPORT_SYMBOL_IF_KUNIT(xe_pci_media_ip_gen_param);
  

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-09-18 14:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-08  7:29 linux-next: manual merge of the kunit-next tree with the drm-xe tree Stephen Rothwell
2025-09-08 13:26 ` Lucas De Marchi
2025-09-08 22:33   ` Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2025-09-18 14:39 Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox