Skip to contentSkip to conversation

x86/boot: Fix incorrect ifdeffery scope

PATCH In review Baoquan He 3 participants 5 messages Mar 4, 2019 – Mar 27, 2019 x86

lore
Share & tools
lore

Baoquan He

author
#0 lore raw

PATCH v3 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.

---
v2->v3:
Add code comment to clearly note the end of the ifdeffery for better code reading.
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..d2f184165934 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 /* BOOT_COMPRESSED_MISC_H */
Signature · 1 line
2.17.2
#1 lore raw
Quoted 2 lines · Baoquan He

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

Looks good, thank you for the fix.

Thanks,
Chao Fan

Quoted 35 lines

---
v2->v3:
Add code comment to clearly note the end of the ifdeffery for better code reading.
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..d2f184165934 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 /* BOOT_COMPRESSED_MISC_H */
Signature · 1 line
2.17.2
author
#2 lore raw
In reply to Baoquan He

Add Thomas and Ingo to CC, and x86 ML.

Quoted 35 lines · Baoquan He

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

---
v2->v3:
Add code comment to clearly note the end of the ifdeffery for better code reading.
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..d2f184165934 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 /* BOOT_COMPRESSED_MISC_H */
Signature · 1 line
2.17.2
author
#3 lore raw
Quoted 1 line · Baoquan He

Add Thomas and Ingo to CC, and x86 ML.

Sorry, forgot saying this is on tip/x86/boot branch.

Quoted 37 lines · Baoquan He
Quoted 35 lines

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

---
v2->v3:
Add code comment to clearly note the end of the ifdeffery for better code reading.
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..d2f184165934 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 /* BOOT_COMPRESSED_MISC_H */
Signature · 1 line
2.17.2
#4 lore raw
In reply to Baoquan He
x86/boot: Fix incorrect ifdeffery scope
Commit-ID:  0f02daed4e089c7a380a0ffdc9d93a5989043cf4
Gitweb:     https://git.kernel.org/tip/0f02daed4e089c7a380a0ffdc9d93a5989043cf4
Author:     Baoquan He <[email protected]>
AuthorDate: Mon, 4 Mar 2019 13:55:46 +0800
Committer:  Borislav Petkov <[email protected]>
CommitDate: Wed, 27 Mar 2019 14:00:51 +0100

x86/boot: Fix incorrect ifdeffery scope

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

Cc Chao Fan <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Juergen Gross <[email protected]>
Cc "Kirill A. Shutemov" <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Tom Lendacky <[email protected]>
Cc x86-ml <[email protected]>
---
 arch/x86/boot/compressed/misc.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/boot/compressed/misc.h +2 -2
index fd13655e0f9b..d2f184165934 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 /* BOOT_COMPRESSED_MISC_H */