Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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/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>

authored by

Lorenzo Stoakes and committed by
Andrew Morton
c234c653 abf2050f

+15 -1
+4
tools/testing/shared/maple-shared.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0+ */ 2 + #ifndef __MAPLE_SHARED_H__ 3 + #define __MAPLE_SHARED_H__ 2 4 3 5 #define CONFIG_DEBUG_MAPLE_TREE 4 6 #define CONFIG_MAPLE_SEARCH ··· 9 7 #include <stdlib.h> 10 8 #include <time.h> 11 9 #include "linux/init.h" 10 + 11 + #endif /* __MAPLE_SHARED_H__ */
+4
tools/testing/shared/shared.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 + #ifndef __SHARED_H__ 3 + #define __SHARED_H__ 2 4 3 5 #include <linux/types.h> 4 6 #include <linux/bug.h> ··· 33 31 #ifndef dump_stack 34 32 #define dump_stack() assert(0) 35 33 #endif 34 + 35 + #endif /* __SHARED_H__ */
+3 -1
tools/testing/shared/shared.mk
··· 15 15 ../../../include/linux/maple_tree.h \ 16 16 ../../../include/linux/radix-tree.h \ 17 17 ../../../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 19 21 20 22 ifndef SHIFT 21 23 SHIFT=3
+4
tools/testing/shared/xarray-shared.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0+ */ 2 + #ifndef __XARRAY_SHARED_H__ 3 + #define __XARRAY_SHARED_H__ 2 4 3 5 #define XA_DEBUG 4 6 #include "shared.h" 7 + 8 + #endif /* __XARRAY_SHARED_H__ */