]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
tools: fix shared radix-tree build
authorLorenzo Stoakes <lorenzo.stoakes@oracle.com>
Tue, 24 Sep 2024 18:07:24 +0000 (19:07 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 26 Sep 2024 21:01:43 +0000 (14:01 -0700)
The shared radix-tree build is not correctly recompiling when
lib/maple_tree.c and lib/test_maple_tree.c are modified - fix this by
adding these core components to the SHARED_DEPS list.

Additionally, add missing header guards to shared header files.

Link: https://lkml.kernel.org/r/20240924180724.112169-1-lorenzo.stoakes@oracle.com
Fixes: 74579d8dab47 ("tools: separate out shared radix-tree components")
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Tested-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Cc: "Liam R. Howlett" <Liam.Howlett@oracle.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/shared/maple-shared.h
tools/testing/shared/shared.h
tools/testing/shared/shared.mk
tools/testing/shared/xarray-shared.h

index 3d847edd149d8890d89b0a06d83b60f1d72fd0e7..dc4d30f3860b9bd23b4177c7d7926ac686887815 100644 (file)
@@ -1,4 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0+ */
+#ifndef __MAPLE_SHARED_H__
+#define __MAPLE_SHARED_H__
 
 #define CONFIG_DEBUG_MAPLE_TREE
 #define CONFIG_MAPLE_SEARCH
@@ -7,3 +9,5 @@
 #include <stdlib.h>
 #include <time.h>
 #include "linux/init.h"
+
+#endif /* __MAPLE_SHARED_H__ */
index f08f683812ad8482ef9a82f0f7e94d7fb85cfd74..13fb4d39966b8f6e3d867ee33fd7ecb368104724 100644 (file)
@@ -1,4 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __SHARED_H__
+#define __SHARED_H__
 
 #include <linux/types.h>
 #include <linux/bug.h>
@@ -31,3 +33,5 @@
 #ifndef dump_stack
 #define dump_stack()   assert(0)
 #endif
+
+#endif /* __SHARED_H__ */
index a05f0588513abbb29bd533074a7f4ebcb4c85bf4..a6bc51d0b0bfb03c3699db011fa0ae23f4506356 100644 (file)
@@ -15,7 +15,9 @@ SHARED_DEPS = Makefile ../shared/shared.mk ../shared/*.h generated/map-shift.h \
        ../../../include/linux/maple_tree.h \
        ../../../include/linux/radix-tree.h \
        ../../../lib/radix-tree.h \
-       ../../../include/linux/idr.h
+       ../../../include/linux/idr.h \
+       ../../../lib/maple_tree.c \
+       ../../../lib/test_maple_tree.c
 
 ifndef SHIFT
        SHIFT=3
index ac2d16ff53ae65e5dea88fcfa03958b3e1756908..d50de788480383c2162128a1db742db416608538 100644 (file)
@@ -1,4 +1,8 @@
 /* SPDX-License-Identifier: GPL-2.0+ */
+#ifndef __XARRAY_SHARED_H__
+#define __XARRAY_SHARED_H__
 
 #define XA_DEBUG
 #include "shared.h"
+
+#endif /* __XARRAY_SHARED_H__ */