[Concept,23/32] boot: pxe: Use IS_ENABLED() for CONFIG_OF_LIBFDT_OVERLAY

Message ID 20260109231151.4056804-24-sjg@u-boot.org
State New
Headers
Series boot: pxe: Refactor into separate load/setup phases |

Commit Message

Simon Glass Jan. 9, 2026, 11:11 p.m. UTC
  From: Simon Glass <simon.glass@canonical.com>

Replace #ifdef CONFIG_OF_LIBFDT_OVERLAY with IS_ENABLED() to allow the
compiler to check the code even when the option is disabled.

Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
---

 boot/pxe_utils.c | 2 --
 1 file changed, 2 deletions(-)
  

Patch

diff --git a/boot/pxe_utils.c b/boot/pxe_utils.c
index 2b1fe45c86d..2084bb3e9bf 100644
--- a/boot/pxe_utils.c
+++ b/boot/pxe_utils.c
@@ -303,7 +303,6 @@  static void label_boot_kaslrseed(struct pxe_context *ctx)
  * @ctx: PXE context
  * @label: Label to process
  */
-#ifdef CONFIG_OF_LIBFDT_OVERLAY
 static void label_boot_fdtoverlay(struct pxe_context *ctx,
 				  struct pxe_label *label)
 {
@@ -383,7 +382,6 @@  skip_overlay:
 			free(overlayfile);
 	} while ((fdtoverlay = strstr(fdtoverlay, " ")));
 }
-#endif
 
 const char *pxe_get_fdt_fallback(struct pxe_label *label, ulong kern_addr)
 {