Skip to content

Commit c234c65

Browse files
lorenzo-stoakesakpm00
authored andcommitted
tools: fix shared radix-tree build
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/[email protected] Fixes: 74579d8 ("tools: separate out shared radix-tree components") Signed-off-by: Lorenzo Stoakes <[email protected]> Tested-by: Sidhartha Kumar <[email protected]> Cc: "Liam R. Howlett" <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: Vlastimil Babka <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent abf2050 commit c234c65

File tree

4 files changed

+15
-1
lines changed

4 files changed

+15
-1
lines changed

tools/testing/shared/maple-shared.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/* SPDX-License-Identifier: GPL-2.0+ */
2+
#ifndef __MAPLE_SHARED_H__
3+
#define __MAPLE_SHARED_H__
24

35
#define CONFIG_DEBUG_MAPLE_TREE
46
#define CONFIG_MAPLE_SEARCH
@@ -7,3 +9,5 @@
79
#include <stdlib.h>
810
#include <time.h>
911
#include "linux/init.h"
12+
13+
#endif /* __MAPLE_SHARED_H__ */

tools/testing/shared/shared.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/* SPDX-License-Identifier: GPL-2.0 */
2+
#ifndef __SHARED_H__
3+
#define __SHARED_H__
24

35
#include <linux/types.h>
46
#include <linux/bug.h>
@@ -31,3 +33,5 @@
3133
#ifndef dump_stack
3234
#define dump_stack() assert(0)
3335
#endif
36+
37+
#endif /* __SHARED_H__ */

tools/testing/shared/shared.mk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ SHARED_DEPS = Makefile ../shared/shared.mk ../shared/*.h generated/map-shift.h \
1515
../../../include/linux/maple_tree.h \
1616
../../../include/linux/radix-tree.h \
1717
../../../lib/radix-tree.h \
18-
../../../include/linux/idr.h
18+
../../../include/linux/idr.h \
19+
../../../lib/maple_tree.c \
20+
../../../lib/test_maple_tree.c
1921

2022
ifndef SHIFT
2123
SHIFT=3

tools/testing/shared/xarray-shared.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
/* SPDX-License-Identifier: GPL-2.0+ */
2+
#ifndef __XARRAY_SHARED_H__
3+
#define __XARRAY_SHARED_H__
24

35
#define XA_DEBUG
46
#include "shared.h"
7+
8+
#endif /* __XARRAY_SHARED_H__ */

0 commit comments

Comments
 (0)