[Concept,04/14] efi: Drop the BS macro with efi debug

Message ID 20250820144621.1073679-5-sjg@u-boot.org
State New
Headers
Series efi: app: Support booting an OS |

Commit Message

Simon Glass Aug. 20, 2025, 2:46 p.m. UTC
  From: Simon Glass <sjg@chromium.org>

Even if this is a subtle dig at EFI, it is only used once and there is
not much benefit in retaining it. Access the system-table directly,
instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 cmd/efidebug.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
  

Patch

diff --git a/cmd/efidebug.c b/cmd/efidebug.c
index 2df0fc4e221..3a4429a3928 100644
--- a/cmd/efidebug.c
+++ b/cmd/efidebug.c
@@ -26,8 +26,6 @@ 
 #include <linux/ctype.h>
 #include <linux/err.h>
 
-#define BS systab.boottime
-
 static bool app_not_supported(const char *cmd)
 {
 	if (!IS_ENABLED(CONFIG_EFI_APP))
@@ -493,7 +491,8 @@  static int do_efi_show_handles(struct cmd_tbl *cmdtp, int flag,
 					  &handler);
 		if (ret == EFI_SUCCESS)
 			printf("  %pD\n", handler->protocol_interface);
-		ret = BS->protocols_per_handle(handles[i], &guid, &count);
+		ret = systab.boottime->protocols_per_handle(handles[i], &guid,
+							    &count);
 		/* Print other protocols */
 		for (j = 0; j < count; j++) {
 			if (guidcmp(guid[j], &efi_guid_device_path))