Re: [PATCH] x86: tidy e820 output

From: Bjorn Helgaas
Date: Wed Sep 22 2010 - 17:23:07 EST


On Wednesday, September 22, 2010 03:07:00 pm Yinghai Lu wrote:
> On 09/22/2010 12:11 PM, Bjorn Helgaas wrote:

> > -static void __init e820_print_type(u32 type)
> > +static char * __init e820_type_name(u32 type)
> > {
> > switch (type) {
> > case E820_RAM:
> > case E820_RESERVED_KERN:
> > - printk(KERN_CONT "(usable)");
> > - break;
> > + return "usable";
> > case E820_RESERVED:
> > - printk(KERN_CONT "(reserved)");
> > - break;
> > + return "reserved";
> > case E820_ACPI:
> > - printk(KERN_CONT "(ACPI data)");
> > - break;
> > + return "ACPI data";
> > case E820_NVS:
> > - printk(KERN_CONT "(ACPI NVS)");
> > - break;
> > + return "ACPI NVS";
> > case E820_UNUSABLE:
> > - printk(KERN_CONT "(unusable)");
> > - break;
> > - default:
> > - printk(KERN_CONT "type %u", type);
> > - break;
> > + return "unusable";
> > }
> > + return "(unknown)";
> > }
>
> type value?

I decided the code simplification was worth skipping the type.
I'd certainly rather have the type value, too, but I don't know
how much hassle to go through to debug a firmware problem. How
important do you think it is?

Bjorn
--
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/