* [PATCH] libfdt: Drop including string.h from libfdt_internal.h
@ 2025-08-11 13:04 Rob Herring (Arm)
2025-08-11 19:57 ` Simon Glass
2025-08-13 1:29 ` David Gibson
0 siblings, 2 replies; 3+ messages in thread
From: Rob Herring (Arm) @ 2025-08-11 13:04 UTC (permalink / raw)
To: David Gibson, devicetree-compiler, Ayush Singh
Commit 0f69cedc08fc ("libfdt_internal: fdt_find_string_len_()") added a
string.h include to libfdt_internal.h which introduces a libc dependency
which cannot be overridden. Environments without libc (e.g. Linux
kernel) use a custom libfdt_env.h. string.h is already indirectly
included in libfdt_env.h, so it can be dropped from libfdt_internal.h.
Fixes: 0f69cedc08fc ("libfdt_internal: fdt_find_string_len_()")
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
libfdt/libfdt_internal.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/libfdt/libfdt_internal.h b/libfdt/libfdt_internal.h
index 773bba87bc6e..b60b5456f596 100644
--- a/libfdt/libfdt_internal.h
+++ b/libfdt/libfdt_internal.h
@@ -6,7 +6,6 @@
* Copyright (C) 2006 David Gibson, IBM Corporation.
*/
#include <fdt.h>
-#include <string.h>
#define FDT_ALIGN(x, a) (((x) + (a) - 1) & ~((a) - 1))
#define FDT_TAGALIGN(x) (FDT_ALIGN((x), FDT_TAGSIZE))
--
2.47.2
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] libfdt: Drop including string.h from libfdt_internal.h
2025-08-11 13:04 [PATCH] libfdt: Drop including string.h from libfdt_internal.h Rob Herring (Arm)
@ 2025-08-11 19:57 ` Simon Glass
2025-08-13 1:29 ` David Gibson
1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2025-08-11 19:57 UTC (permalink / raw)
To: Rob Herring (Arm); +Cc: David Gibson, devicetree-compiler, Ayush Singh
On Mon, 11 Aug 2025 at 07:05, Rob Herring (Arm) <robh@kernel.org> wrote:
>
> Commit 0f69cedc08fc ("libfdt_internal: fdt_find_string_len_()") added a
> string.h include to libfdt_internal.h which introduces a libc dependency
> which cannot be overridden. Environments without libc (e.g. Linux
> kernel) use a custom libfdt_env.h. string.h is already indirectly
> included in libfdt_env.h, so it can be dropped from libfdt_internal.h.
>
> Fixes: 0f69cedc08fc ("libfdt_internal: fdt_find_string_len_()")
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> ---
> libfdt/libfdt_internal.h | 1 -
> 1 file changed, 1 deletion(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
>
> diff --git a/libfdt/libfdt_internal.h b/libfdt/libfdt_internal.h
> index 773bba87bc6e..b60b5456f596 100644
> --- a/libfdt/libfdt_internal.h
> +++ b/libfdt/libfdt_internal.h
> @@ -6,7 +6,6 @@
> * Copyright (C) 2006 David Gibson, IBM Corporation.
> */
> #include <fdt.h>
> -#include <string.h>
>
> #define FDT_ALIGN(x, a) (((x) + (a) - 1) & ~((a) - 1))
> #define FDT_TAGALIGN(x) (FDT_ALIGN((x), FDT_TAGSIZE))
> --
> 2.47.2
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] libfdt: Drop including string.h from libfdt_internal.h
2025-08-11 13:04 [PATCH] libfdt: Drop including string.h from libfdt_internal.h Rob Herring (Arm)
2025-08-11 19:57 ` Simon Glass
@ 2025-08-13 1:29 ` David Gibson
1 sibling, 0 replies; 3+ messages in thread
From: David Gibson @ 2025-08-13 1:29 UTC (permalink / raw)
To: Rob Herring (Arm); +Cc: devicetree-compiler, Ayush Singh
[-- Attachment #1: Type: text/plain, Size: 1335 bytes --]
On Mon, Aug 11, 2025 at 08:04:16AM -0500, Rob Herring (Arm) wrote:
> Commit 0f69cedc08fc ("libfdt_internal: fdt_find_string_len_()") added a
> string.h include to libfdt_internal.h which introduces a libc dependency
> which cannot be overridden. Environments without libc (e.g. Linux
> kernel) use a custom libfdt_env.h. string.h is already indirectly
> included in libfdt_env.h, so it can be dropped from libfdt_internal.h.
>
> Fixes: 0f69cedc08fc ("libfdt_internal: fdt_find_string_len_()")
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Ouch, should have spotted that on review, sorry.
Fix merged.
> ---
> libfdt/libfdt_internal.h | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/libfdt/libfdt_internal.h b/libfdt/libfdt_internal.h
> index 773bba87bc6e..b60b5456f596 100644
> --- a/libfdt/libfdt_internal.h
> +++ b/libfdt/libfdt_internal.h
> @@ -6,7 +6,6 @@
> * Copyright (C) 2006 David Gibson, IBM Corporation.
> */
> #include <fdt.h>
> -#include <string.h>
>
> #define FDT_ALIGN(x, a) (((x) + (a) - 1) & ~((a) - 1))
> #define FDT_TAGALIGN(x) (FDT_ALIGN((x), FDT_TAGSIZE))
--
David Gibson (he or they) | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you, not the other way
| around.
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-08-13 1:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-11 13:04 [PATCH] libfdt: Drop including string.h from libfdt_internal.h Rob Herring (Arm)
2025-08-11 19:57 ` Simon Glass
2025-08-13 1:29 ` David Gibson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.