From 8ec67d97bff592cc5b5325d1ee3646ebd7d635fc Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Fri, 27 Jan 2017 12:54:38 +0100 Subject: x86/boot/e820: Rename the basic e820 data types to 'struct e820_entry' and 'struct e820_array' The 'e820entry' and 'e820map' names have various annoyances: - the missing underscore departs from the usual kernel style and makes the code look weird, - in the past I kept confusing the 'map' with the 'entry', because a 'map' is ambiguous in that regard, - it's not really clear from the 'e820map' that this is a regular C array. Rename them to 'struct e820_entry' and 'struct e820_array' accordingly. ( Leave the legacy UAPI header alone but do the rename in the bootparam.h and e820/types.h file - outside tools relying on these defines should either adjust their code, or should use the legacy header, or should create their private copies for the definitions. ) No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar --- tools/lguest/lguest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/lguest/lguest.c b/tools/lguest/lguest.c index 11c8d9bc762e..7deb8d4a976e 100644 --- a/tools/lguest/lguest.c +++ b/tools/lguest/lguest.c @@ -3339,7 +3339,7 @@ int main(int argc, char *argv[]) * simple, single region. */ boot->e820_entries = 1; - boot->e820_map[0] = ((struct e820entry) { 0, mem, E820_RAM }); + boot->e820_map[0] = ((struct e820_entry) { 0, mem, E820_RAM }); /* * The boot header contains a command line pointer: we put the command * line after the boot header. -- cgit v1.2.3 From acd4c048728814505fae8e224cf9074bd1ad291e Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Fri, 27 Jan 2017 13:20:53 +0100 Subject: x86/boot/e820: Rename 'e820_map' variables to 'e820_array' In line with the rename to 'struct e820_array', harmonize the naming of common e820 table variable names as well: e820 => e820_array e820_saved => e820_array_saved e820_map => e820_array initial_e820 => e820_array_init This makes the variable names more consistent and easier to grep for. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar --- tools/lguest/lguest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/lguest/lguest.c b/tools/lguest/lguest.c index 7deb8d4a976e..92a1fe3c07eb 100644 --- a/tools/lguest/lguest.c +++ b/tools/lguest/lguest.c @@ -3339,7 +3339,7 @@ int main(int argc, char *argv[]) * simple, single region. */ boot->e820_entries = 1; - boot->e820_map[0] = ((struct e820_entry) { 0, mem, E820_RAM }); + boot->e820_array[0] = ((struct e820_entry) { 0, mem, E820_RAM }); /* * The boot header contains a command line pointer: we put the command * line after the boot header. -- cgit v1.2.3 From 61a50101638254d38e3f4281265b44de0f2cba4e Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Fri, 27 Jan 2017 13:54:38 +0100 Subject: x86/boot/e820: Rename everything to e820_table No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar --- tools/lguest/lguest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/lguest/lguest.c b/tools/lguest/lguest.c index 92a1fe3c07eb..3819e23a173e 100644 --- a/tools/lguest/lguest.c +++ b/tools/lguest/lguest.c @@ -3339,7 +3339,7 @@ int main(int argc, char *argv[]) * simple, single region. */ boot->e820_entries = 1; - boot->e820_array[0] = ((struct e820_entry) { 0, mem, E820_RAM }); + boot->e820_table[0] = ((struct e820_entry) { 0, mem, E820_RAM }); /* * The boot header contains a command line pointer: we put the command * line after the boot header. -- cgit v1.2.3 From 09821ff1d50a1ecade182c2a68a90f835e257eef Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Sat, 28 Jan 2017 17:09:33 +0100 Subject: x86/boot/e820: Prefix the E820_* type names with "E820_TYPE_" So there's a number of constants that start with "E820" but which are not types - these create a confusing mixture when seen together with 'enum e820_type' values: E820MAP E820NR E820_X_MAX E820MAX To better differentiate the 'enum e820_type' values prefix them with E820_TYPE_. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar --- tools/lguest/lguest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/lguest/lguest.c b/tools/lguest/lguest.c index 3819e23a173e..4e38ea02ef0f 100644 --- a/tools/lguest/lguest.c +++ b/tools/lguest/lguest.c @@ -3339,7 +3339,7 @@ int main(int argc, char *argv[]) * simple, single region. */ boot->e820_entries = 1; - boot->e820_table[0] = ((struct e820_entry) { 0, mem, E820_RAM }); + boot->e820_table[0] = ((struct e820_entry) { 0, mem, E820_TYPE_RAM }); /* * The boot header contains a command line pointer: we put the command * line after the boot header. -- cgit v1.2.3