Re: [PATCH 2/4] x86_64 boot -v2: Add linked list of structsetup_data

From: Huang, Ying
Date: Sun Mar 30 2008 - 20:57:04 EST


On Sat, 2008-03-29 at 23:31 -0500, Paul Jackson wrote:
> Huang wrote:
> > +/* setup data types */
> > +#define SETUP_NONE 0
>
> This define seems unused?

I think this can prevent somebody to use 0 as type id.

> Actually, what use would it ever have? Should not every
> struct setup_data on the setup_data linked list have a
> valid (not NONE) type? And perhaps that switch statement
> that confused me:
>
> > + switch (data->type) {
> > + default:
> > + break;
> > + }
>
> should not "break" silently on an unrecognized data->type, but
> rather complain bitterly?

Yes. A warning should be made on unrecognized data->type.

Best Regards,
Huang Ying
--
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/