mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] powerpc/boot: Use the compiler's stdbool.h
@ 2026-11-16 20:44 Thorsten Blum
  0 siblings, 0 replies; only message in thread
From: Thorsten Blum @ 2026-11-16 20:44 UTC (permalink / raw)
  To: Madhavan Srinivasan, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy (CS GROUP), Ritesh Harjani (IBM),
	Shrikanth Hegde
  Cc: Thorsten Blum, linuxppc-dev, linux-kernel

Commit c762c69e106f ("powerpc/boot: Add support for XZ compression")
added custom boolean definitions to types.h and a local stdbool.h that
only includes types.h.

However, the boot wrapper already adds the compiler's header directory
to the include path. Remove the local header and the custom boolean
definitions so the existing include in types.h uses the compiler's
stdbool.h instead.

This changes bool from int to _Bool and its size from 4 bytes to 1 byte.

Signed-off-by: Thorsten Blum <blum@kernel.org>
---
This patch applies on top of:
https://lore.kernel.org/r/20260828130622.576064-3-blum@kernel.org/

 arch/powerpc/boot/stdbool.h | 9 ---------
 arch/powerpc/boot/types.h   | 9 ---------
 2 files changed, 18 deletions(-)
 delete mode 100644 arch/powerpc/boot/stdbool.h

diff --git a/arch/powerpc/boot/stdbool.h b/arch/powerpc/boot/stdbool.h
deleted file mode 100644
index 2dfe247ede80..000000000000
--- a/arch/powerpc/boot/stdbool.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
-/*
- * Copyright (C) IBM Corporation 2016.
- *
- * This file is only necessary because some of the pre-boot decompressors
- * expect stdbool.h to be available.
- */
-
-#include "types.h"
diff --git a/arch/powerpc/boot/types.h b/arch/powerpc/boot/types.h
index c5085c2632bf..08529138c524 100644
--- a/arch/powerpc/boot/types.h
+++ b/arch/powerpc/boot/types.h
@@ -37,13 +37,4 @@ typedef s64 int64_t;
 	(void) (&_x == &_y);	\
 	_x > _y ? _x : _y; })
 
-typedef int bool;
-
-#ifndef true
-#define true 1
-#endif
-
-#ifndef false
-#define false 0
-#endif
 #endif /* _TYPES_H_ */

base-commit: aebb7274476403040d582c61478df8f4a7bf9cd3
prerequisite-patch-id: 068c3f1381513a18034f0a88224c0bf37db8cfa3

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-16 20:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-16 20:44 [PATCH] powerpc/boot: Use the compiler's stdbool.h Thorsten Blum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®