Skip to contentSkip to conversation

linux-next: build failure after merge of the xarray tree

PATCH Stephen Rothwell 1 participant 1 message Oct 8, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Hi all,

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

lib/test_xarray.c: In function 'check_xa_mark_3':
lib/test_xarray.c:305:3: error: implicit declaration of function 'assert' [-Werror=implicit-function-declaration]

  305 |   assert(1);
      |   ^~~~~~
lib/test_xarray.c:11:1: note: 'assert' is defined in header '<assert.h>'; did you forget to '#include <assert.h>'?
   10 | #include <linux/module.h>
  +++ |+#include <assert.h>
   11 | 

Caused by commit

5c8052d7925b ("XArray test: Add new test")

I have added the following hack for today:

From: Stephen Rothwell <[email protected]>
Date: Thu, 8 Oct 2020 17:46:26 +1100
Subject: [PATCH] XArray test: remove assert()

---
 lib/test_xarray.c | 1 -
 1 file changed, 1 deletion(-)
lib/test_xarray.c +0 -1
index 9d9c09d1f781..21bb06c213a2 100644
@@ -302,7 +302,6 @@ static noinline void check_xa_mark_3(struct xarray *xa)
 	rcu_read_lock();
 	xas_for_each_marked(&xas, entry, ULONG_MAX, XA_MARK_0) {
 		count++;
-		assert(1);
 	}
 	XA_BUG_ON(xa, count != 1);
 	rcu_read_unlock();
Signature · 5 lines
2.28.0

-- 
Cheers,
Stephen Rothwell