Skip to contentSkip to conversation

x86/boot: Fix incorrect ifdeffery scope

PATCH Superseded Baoquan He 2 participants 3 messages Mar 4, 2019 x86

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Baoquan He

author
#0 lore raw

PATCH v2 1/1 x86/boot: Fix incorrect ifdeffery scope

The declarations related to immovable memory handling are put out of the BOOT_COMPRESSED_MISC_H #ifdef scope, wrap them inside.

---
v1->v2:
Add the lost line which could be made by git.

 arch/x86/boot/compressed/misc.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/boot/compressed/misc.h +2 -2
index fd13655e0f9b..8bbaf362855c 100644
@@ -120,8 +120,6 @@ static inline void console_init(void)
 
 void set_sev_encryption_mask(void);
 
-#endif
-
 /* acpi.c */
 #ifdef CONFIG_ACPI
 acpi_physical_address get_rsdp_addr(void);
@@ -135,3 +133,5 @@ int count_immovable_mem_regions(void);
 #else
 static inline int count_immovable_mem_regions(void) { return 0; }
 #endif
+
+#endif
Signature · 1 line
2.17.2
#1 lore raw
Quoted 25 lines · Baoquan He

The declarations related to immovable memory handling are put out of the BOOT_COMPRESSED_MISC_H #ifdef scope, wrap them inside.

---
v1->v2:
Add the lost line which could be made by git.

arch/x86/boot/compressed/misc.h | 4 ++--

1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/boot/compressed/misc.h +0 -2
index fd13655e0f9b..8bbaf362855c 100644
@@ -120,8 +120,6 @@ static inline void console_init(void)
 
 void set_sev_encryption_mask(void);
 
-#endif
-
 /* acpi.c */
 #ifdef CONFIG_ACPI
 acpi_physical_address get_rsdp_addr(void);

arch/x86/boot/compressed/misc.h int count_immovable_mem_regions(void); · line 137

Quoted 5 lines
arch/x86/boot/compressed/misc.h +2 -0
@@ -135,3 +133,5 @@ int count_immovable_mem_regions(void);
 #else
 static inline int count_immovable_mem_regions(void) { return 0; }
 #endif
+
+#endif

If it will look better:

+#endif /* BOOT_COMPRESSED_MISC_H */

I am sorry that I should say that in your V1 version, but I really forgot it after noticing that PATCH log.

Thanks,
Chao Fan

Quoted 5 lines
Signature · 1 line
2.17.2
author
#2 lore raw
Quoted 4 lines · Chao Fan

+#endif /* BOOT_COMPRESSED_MISC_H */

I am sorry that I should say that in your V1 version, but I really forgot it after noticing that PATCH log.

Yes, that's better. Can note us better where the ifdeffery ends.

Will send v3. thx.