]> git.sur5r.net Git - u-boot/blobdiff - lib/efi/efi_stub.c
tools/file2include: create Linux style SPDX header
[u-boot] / lib / efi / efi_stub.c
index 2e8d409d31af1ea99f90932dfe6c292a13ef7ce0..3138739ee56a154a5e58d7af8a2da072d953bbd9 100644 (file)
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (c) 2015 Google, Inc
  *
- * SPDX-License-Identifier:    GPL-2.0+
- *
  * EFI information obtained here:
  * http://wiki.phoenix.com/wiki/index.php/EFI_BOOT_SERVICES
  *
@@ -21,8 +20,6 @@
 #include <linux/err.h>
 #include <linux/types.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #ifndef CONFIG_X86
 /*
  * Problem areas:
@@ -182,7 +179,7 @@ static int get_codeseg32(void)
                                << 16;
                base <<= 12;    /* 4KB granularity */
                limit <<= 12;
-               if ((desc & GDT_PRESENT) && (desc && GDT_NOTSYS) &&
+               if ((desc & GDT_PRESENT) && (desc & GDT_NOTSYS) &&
                    !(desc & GDT_LONG) && (desc & GDT_4KB) &&
                    (desc & GDT_32BIT) && (desc & GDT_CODE) &&
                    CONFIG_SYS_TEXT_BASE > base &&