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

From: Ingo Molnar
Date: Fri Feb 18 2011 - 02:32:22 EST



* Mike Travis <travis@xxxxxxx> 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@xxxxxxx>
> Reviewed-by: Jack Steiner <steiner@xxxxxxx>
> Reviewed-by: Robin Holt <holt@xxxxxxx>
> ---
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/