linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the thunderbolt tree
@ 2020-06-30  6:03 Stephen Rothwell
  2020-06-30  9:27 ` Alan Maguire
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Stephen Rothwell @ 2020-06-30  6:03 UTC (permalink / raw)
  To: Mika Westerberg, Shuah Khan, Brendan Higgins
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Alan Maguire

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

Hi all,

After merging the thunderbolt tree, today's linux-next build (powerpc
allyesconfig) failed like this:


Caused by commit

  54509f5005ca ("thunderbolt: Add KUnit tests for path walking")

interacting with commit

  d4cdd146d0db ("kunit: generalize kunit_resource API beyond allocated resources")

from the kunit-next tree.

I have applied the following merge fix patch.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 30 Jun 2020 15:51:50 +1000
Subject: [PATCH] thunderbolt: merge fix for kunix_resource changes

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/thunderbolt/test.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/thunderbolt/test.c b/drivers/thunderbolt/test.c
index acb8b6256847..a4d78811f7e2 100644
--- a/drivers/thunderbolt/test.c
+++ b/drivers/thunderbolt/test.c
@@ -17,13 +17,13 @@ static int __ida_init(struct kunit_resource *res, void *context)
 	struct ida *ida = context;
 
 	ida_init(ida);
-	res->allocation = ida;
+	res->data = ida;
 	return 0;
 }
 
 static void __ida_destroy(struct kunit_resource *res)
 {
-	struct ida *ida = res->allocation;
+	struct ida *ida = res->data;
 
 	ida_destroy(ida);
 }
-- 
2.27.0

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the thunderbolt tree
  2020-06-30  6:03 linux-next: build failure after merge of the thunderbolt tree Stephen Rothwell
@ 2020-06-30  9:27 ` Alan Maguire
  2020-06-30 11:33 ` Mika Westerberg
  2020-08-09  8:18 ` Stephen Rothwell
  2 siblings, 0 replies; 8+ messages in thread
From: Alan Maguire @ 2020-06-30  9:27 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Mika Westerberg, Shuah Khan, Brendan Higgins,
	Linux Next Mailing List, Linux Kernel Mailing List, Alan Maguire

On Tue, 30 Jun 2020, Stephen Rothwell wrote:

> Hi all,
> 
> After merging the thunderbolt tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
> 
> 
> Caused by commit
> 
>   54509f5005ca ("thunderbolt: Add KUnit tests for path walking")
> 
> interacting with commit
> 
>   d4cdd146d0db ("kunit: generalize kunit_resource API beyond allocated resources")
> 
> from the kunit-next tree.
> 
> I have applied the following merge fix patch.
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Tue, 30 Jun 2020 15:51:50 +1000
> Subject: [PATCH] thunderbolt: merge fix for kunix_resource changes
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Thanks Stephen, resolution looks good to me! If you need it

Reviewed-by: Alan Maguire <alan.maguire@oracle.com>

Once the kunit and thunderbolt trees are merged there may
be some additional things we can do to simplify kunit
resource utilization in the thuderbolt tests using the new
kunit resource APIs; no hurry with that though. Nice to
see the kunit resources code being used!

Alan

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

* Re: linux-next: build failure after merge of the thunderbolt tree
  2020-06-30  6:03 linux-next: build failure after merge of the thunderbolt tree Stephen Rothwell
  2020-06-30  9:27 ` Alan Maguire
@ 2020-06-30 11:33 ` Mika Westerberg
  2020-08-09  0:50   ` Guenter Roeck
  2020-08-09  8:18 ` Stephen Rothwell
  2 siblings, 1 reply; 8+ messages in thread
From: Mika Westerberg @ 2020-06-30 11:33 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Shuah Khan, Brendan Higgins, Linux Next Mailing List,
	Linux Kernel Mailing List, Alan Maguire

On Tue, Jun 30, 2020 at 04:03:46PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the thunderbolt tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
> 
> 
> Caused by commit
> 
>   54509f5005ca ("thunderbolt: Add KUnit tests for path walking")
> 
> interacting with commit
> 
>   d4cdd146d0db ("kunit: generalize kunit_resource API beyond allocated resources")
> 
> from the kunit-next tree.

Thanks for reporting and fixing. The fix looks good to me.

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

* Re: linux-next: build failure after merge of the thunderbolt tree
  2020-06-30 11:33 ` Mika Westerberg
@ 2020-08-09  0:50   ` Guenter Roeck
  0 siblings, 0 replies; 8+ messages in thread
From: Guenter Roeck @ 2020-08-09  0:50 UTC (permalink / raw)
  To: Mika Westerberg
  Cc: Stephen Rothwell, Shuah Khan, Brendan Higgins,
	Linux Next Mailing List, Linux Kernel Mailing List, Alan Maguire

On Tue, Jun 30, 2020 at 02:33:02PM +0300, Mika Westerberg wrote:
> On Tue, Jun 30, 2020 at 04:03:46PM +1000, Stephen Rothwell wrote:
> > Hi all,
> > 
> > After merging the thunderbolt tree, today's linux-next build (powerpc
> > allyesconfig) failed like this:
> > 
> > 
> > Caused by commit
> > 
> >   54509f5005ca ("thunderbolt: Add KUnit tests for path walking")
> > 
> > interacting with commit
> > 
> >   d4cdd146d0db ("kunit: generalize kunit_resource API beyond allocated resources")
> > 
> > from the kunit-next tree.
> 
> Thanks for reporting and fixing. The fix looks good to me.

Unfortunately, the fix didn't make it into mainline.

Building x86_64:allyesconfig ... failed
--------------
Error log:
drivers/thunderbolt/test.c: In function '__ida_init':
drivers/thunderbolt/test.c:20:5: error: 'struct kunit_resource' has no member named 'allocation'
   20 |  res->allocation = ida;
      |     ^~
drivers/thunderbolt/test.c: In function '__ida_destroy':
drivers/thunderbolt/test.c:26:23: error: 'struct kunit_resource' has no member named 'allocation'
   26 |  struct ida *ida = res->allocation;
      |                       ^~
make[3]: *** [drivers/thunderbolt/test.o] Error 1

Guenter

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

* Re: linux-next: build failure after merge of the thunderbolt tree
  2020-06-30  6:03 linux-next: build failure after merge of the thunderbolt tree Stephen Rothwell
  2020-06-30  9:27 ` Alan Maguire
  2020-06-30 11:33 ` Mika Westerberg
@ 2020-08-09  8:18 ` Stephen Rothwell
  2020-08-09 18:04   ` Linus Torvalds
  2 siblings, 1 reply; 8+ messages in thread
From: Stephen Rothwell @ 2020-08-09  8:18 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Mika Westerberg, Shuah Khan, Brendan Higgins,
	Linux Next Mailing List, Linux Kernel Mailing List, Alan Maguire,
	Guenter Roeck

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

Hi Linus,

On Tue, 30 Jun 2020 16:03:46 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the thunderbolt tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
> 
> 
> Caused by commit
> 
>   54509f5005ca ("thunderbolt: Add KUnit tests for path walking")
> 
> interacting with commit
> 
>   d4cdd146d0db ("kunit: generalize kunit_resource API beyond allocated resources")
> 
> from the kunit-next tree.
> 
> I have applied the following merge fix patch.
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Tue, 30 Jun 2020 15:51:50 +1000
> Subject: [PATCH] thunderbolt: merge fix for kunix_resource changes
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  drivers/thunderbolt/test.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/thunderbolt/test.c b/drivers/thunderbolt/test.c
> index acb8b6256847..a4d78811f7e2 100644
> --- a/drivers/thunderbolt/test.c
> +++ b/drivers/thunderbolt/test.c
> @@ -17,13 +17,13 @@ static int __ida_init(struct kunit_resource *res, void *context)
>  	struct ida *ida = context;
>  
>  	ida_init(ida);
> -	res->allocation = ida;
> +	res->data = ida;
>  	return 0;
>  }
>  
>  static void __ida_destroy(struct kunit_resource *res)
>  {
> -	struct ida *ida = res->allocation;
> +	struct ida *ida = res->data;
>  
>  	ida_destroy(ida);
>  }
> -- 
> 2.27.0
> 
> -- 
> Cheers,
> Stephen Rothwell

I looks like the above report got lost along the way to you :-(

Here's the patch in case you want to directly apply it:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 30 Jun 2020 15:51:50 +1000
Subject: [PATCH] thunderbolt: merge fix for kunix_resource changes

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/thunderbolt/test.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/thunderbolt/test.c b/drivers/thunderbolt/test.c
index acb8b6256847..a4d78811f7e2 100644
--- a/drivers/thunderbolt/test.c
+++ b/drivers/thunderbolt/test.c
@@ -17,13 +17,13 @@ static int __ida_init(struct kunit_resource *res, void *context)
 	struct ida *ida = context;
 
 	ida_init(ida);
-	res->allocation = ida;
+	res->data = ida;
 	return 0;
 }
 
 static void __ida_destroy(struct kunit_resource *res)
 {
-	struct ida *ida = res->allocation;
+	struct ida *ida = res->data;
 
 	ida_destroy(ida);
 }


-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the thunderbolt tree
  2020-08-09  8:18 ` Stephen Rothwell
@ 2020-08-09 18:04   ` Linus Torvalds
  2020-08-09 23:10     ` Stephen Rothwell
  0 siblings, 1 reply; 8+ messages in thread
From: Linus Torvalds @ 2020-08-09 18:04 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Mika Westerberg, Shuah Khan, Brendan Higgins,
	Linux Next Mailing List, Linux Kernel Mailing List, Alan Maguire,
	Guenter Roeck

On Sun, Aug 9, 2020 at 1:19 AM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> I looks like the above report got lost along the way to you :-(

Hmm. Why didn't I see this as a build failure?

Oh. Because the USB4_KUNIT_TEST stuff requires everything to be built
in. And I have them as modules.

That's a bit unfortunate. I see the commentary in commit 54509f5005ca
("thunderbolt: Add KUnit tests for path walking") about how this is
fine because only developers run the tests, but it has this very
unfortunate side issue of not getting a lot of build coverage either.

> Here's the patch in case you want to directly apply it:

Will do. Thanks,

             Linus

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

* Re: linux-next: build failure after merge of the thunderbolt tree
  2020-08-09 18:04   ` Linus Torvalds
@ 2020-08-09 23:10     ` Stephen Rothwell
  2020-08-10 10:12       ` Mika Westerberg
  0 siblings, 1 reply; 8+ messages in thread
From: Stephen Rothwell @ 2020-08-09 23:10 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Mika Westerberg, Shuah Khan, Brendan Higgins,
	Linux Next Mailing List, Linux Kernel Mailing List, Alan Maguire,
	Guenter Roeck

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

Hi Linus,

On Sun, 9 Aug 2020 11:04:28 -0700 Linus Torvalds <torvalds@linux-foundation.org> wrote:
>
> On Sun, Aug 9, 2020 at 1:19 AM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > I looks like the above report got lost along the way to you :-(  
> 
> Hmm. Why didn't I see this as a build failure?
> 
> Oh. Because the USB4_KUNIT_TEST stuff requires everything to be built
> in. And I have them as modules.

Yeah, I only saw it because I do an allyesconfig build late in my day.

> > Here's the patch in case you want to directly apply it:  
> 
> Will do. Thanks,

Thanks.

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the thunderbolt tree
  2020-08-09 23:10     ` Stephen Rothwell
@ 2020-08-10 10:12       ` Mika Westerberg
  0 siblings, 0 replies; 8+ messages in thread
From: Mika Westerberg @ 2020-08-10 10:12 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Linus Torvalds, Shuah Khan, Brendan Higgins,
	Linux Next Mailing List, Linux Kernel Mailing List, Alan Maguire,
	Guenter Roeck, Greg Kroah-Hartman

Hi all,

On Mon, Aug 10, 2020 at 09:10:53AM +1000, Stephen Rothwell wrote:
> Hi Linus,
> 
> On Sun, 9 Aug 2020 11:04:28 -0700 Linus Torvalds <torvalds@linux-foundation.org> wrote:
> >
> > On Sun, Aug 9, 2020 at 1:19 AM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > >
> > > I looks like the above report got lost along the way to you :-(  
> > 
> > Hmm. Why didn't I see this as a build failure?
> > 
> > Oh. Because the USB4_KUNIT_TEST stuff requires everything to be built
> > in. And I have them as modules.
> 
> Yeah, I only saw it because I do an allyesconfig build late in my day.

Sorry about this. I was not sure how to deal with this as Thunderbolt
goes through Greg's USB tree, so I just ended up mentioning it in my
pull request without actually including the complete patch.

The reason for the built in dependency is that KUnit adds its own
module_init() in kunit_test_suite() so that causes linker error since
the TBT driver does the same. I guess the better alternative would be to
not use kunit_test_suite() and instead make calls to
__kunit_test_suites_init() and __kunit_test_suites_exit() in the
driver's nhi_init()/nhi_exit().

> > > Here's the patch in case you want to directly apply it:  
> > 
> > Will do. Thanks,
> 
> Thanks.

Thanks!

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

end of thread, other threads:[~2020-08-10 10:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-30  6:03 linux-next: build failure after merge of the thunderbolt tree Stephen Rothwell
2020-06-30  9:27 ` Alan Maguire
2020-06-30 11:33 ` Mika Westerberg
2020-08-09  0:50   ` Guenter Roeck
2020-08-09  8:18 ` Stephen Rothwell
2020-08-09 18:04   ` Linus Torvalds
2020-08-09 23:10     ` Stephen Rothwell
2020-08-10 10:12       ` Mika Westerberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).