* [PATCH] tools: fix shared radix-tree build
@ 2024-09-24 18:07 Lorenzo Stoakes
2024-09-24 18:48 ` Sid Kumar
0 siblings, 1 reply; 2+ messages in thread
From: Lorenzo Stoakes @ 2024-09-24 18:07 UTC (permalink / raw)
To: Andrew Morton
Cc: Vlastimil Babka, Liam R . Howlett, Sidhartha Kumar, linux-mm,
linux-kernel, Matthew Wilcox, linux-fsdevel
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.
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
---
tools/testing/shared/maple-shared.h | 4 ++++
tools/testing/shared/shared.h | 4 ++++
tools/testing/shared/shared.mk | 4 +++-
tools/testing/shared/xarray-shared.h | 4 ++++
4 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/tools/testing/shared/maple-shared.h b/tools/testing/shared/maple-shared.h
index 3d847edd149d..dc4d30f3860b 100644
--- a/tools/testing/shared/maple-shared.h
+++ b/tools/testing/shared/maple-shared.h
@@ -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__ */
diff --git a/tools/testing/shared/shared.h b/tools/testing/shared/shared.h
index f08f683812ad..13fb4d39966b 100644
--- a/tools/testing/shared/shared.h
+++ b/tools/testing/shared/shared.h
@@ -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__ */
diff --git a/tools/testing/shared/shared.mk b/tools/testing/shared/shared.mk
index a05f0588513a..a6bc51d0b0bf 100644
--- a/tools/testing/shared/shared.mk
+++ b/tools/testing/shared/shared.mk
@@ -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
diff --git a/tools/testing/shared/xarray-shared.h b/tools/testing/shared/xarray-shared.h
index ac2d16ff53ae..d50de7884803 100644
--- a/tools/testing/shared/xarray-shared.h
+++ b/tools/testing/shared/xarray-shared.h
@@ -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__ */
--
2.46.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] tools: fix shared radix-tree build
2024-09-24 18:07 [PATCH] tools: fix shared radix-tree build Lorenzo Stoakes
@ 2024-09-24 18:48 ` Sid Kumar
0 siblings, 0 replies; 2+ messages in thread
From: Sid Kumar @ 2024-09-24 18:48 UTC (permalink / raw)
To: Lorenzo Stoakes, Andrew Morton
Cc: Vlastimil Babka, Liam R . Howlett, linux-mm, linux-kernel,
Matthew Wilcox, linux-fsdevel
On 9/24/24 1:07 PM, Lorenzo Stoakes wrote:
> 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.
>
> Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Tested-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
> ---
> tools/testing/shared/maple-shared.h | 4 ++++
> tools/testing/shared/shared.h | 4 ++++
> tools/testing/shared/shared.mk | 4 +++-
> tools/testing/shared/xarray-shared.h | 4 ++++
> 4 files changed, 15 insertions(+), 1 deletion(-)
>
> diff --git a/tools/testing/shared/maple-shared.h b/tools/testing/shared/maple-shared.h
> index 3d847edd149d..dc4d30f3860b 100644
> --- a/tools/testing/shared/maple-shared.h
> +++ b/tools/testing/shared/maple-shared.h
> @@ -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__ */
> diff --git a/tools/testing/shared/shared.h b/tools/testing/shared/shared.h
> index f08f683812ad..13fb4d39966b 100644
> --- a/tools/testing/shared/shared.h
> +++ b/tools/testing/shared/shared.h
> @@ -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__ */
> diff --git a/tools/testing/shared/shared.mk b/tools/testing/shared/shared.mk
> index a05f0588513a..a6bc51d0b0bf 100644
> --- a/tools/testing/shared/shared.mk
> +++ b/tools/testing/shared/shared.mk
> @@ -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
> diff --git a/tools/testing/shared/xarray-shared.h b/tools/testing/shared/xarray-shared.h
> index ac2d16ff53ae..d50de7884803 100644
> --- a/tools/testing/shared/xarray-shared.h
> +++ b/tools/testing/shared/xarray-shared.h
> @@ -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__ */
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-09-24 18:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-24 18:07 [PATCH] tools: fix shared radix-tree build Lorenzo Stoakes
2024-09-24 18:48 ` Sid Kumar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox