Re: [PATCH 3/5] x86: Minimize SRAT messages

Ingo Molnar
2011-02-18T07:32:19Z

* Mike Travis <travis@sgi.com> wrote:

> Condense the SRAT: messages to show all APIC id's for the
> node on a single line.
>
> v1: Added pertinent __init & __initdata specifiers.
> v2: updated to apply to x86-tip
>
> Signed-off-by: Mike Travis <travis@sgi.com>
> Reviewed-by: Jack Steiner <steiner@sgi.com>
> Reviewed-by: Robin Holt <holt@sgi.com>
> ---
> arch/x86/mm/srat_64.c | 16 ++++++++++++----
> drivers/acpi/numa.c | 3 +++
> 2 files changed, 15 insertions(+), 4 deletions(-)
>
> --- linux.orig/arch/x86/mm/srat_64.c
> +++ linux/arch/x86/mm/srat_64.c
> @@ -116,6 +116,7 @@ acpi_numa_x2apic_affinity_init(struct ac
> {
> int pxm, node;
> int apic_id;
> + static int __initdata last_node = -1, last_pxm = -1;

Please do not put global variables amongst local variables - put them into file
scope.

> + } else if (pxm != last_pxm) {
> + pr_cont(" %u:%u", pxm, apic_id);
> + last_pxm = pxm;
> + } else
> + pr_cont(" :%u", apic_id);

Curly braces should be balanced.

Ingo