On Thu, 2009-06-11 at 19:09 +0800, Zhang Le wrote: > On 04:31 Thu 11 Jun , Zhang Le wrote: > > [...] > > > > > diff --git a/arch/mips/loongson/common/machtype.c b/arch/mips/loongson/common/machtype.c > > index d469dc7..34417cf 100644 > > --- a/arch/mips/loongson/common/machtype.c > > +++ b/arch/mips/loongson/common/machtype.c > > [...] > > > -static __init int machname_setup(char *str) > > +static __init int machtype_setup(char *str) > > [...] > > > - for (index = 0; > > - index < MACHTYPE_TOTAL; > > - index++) { > > - if (strstr(str, machname[index]) != NULL) { > > - mips_machtype = index; > > - return 0; > > + for (; system_types[machtype]; machtype++) > > + if (strstr(str, system_types[machtype])) { > > There is a problem here. > > Because I have used "inches" instead of "inch" in system_types, if you insist > on using "inch" when passing value to the machtype kernel parameter, this > strstr() call's two parameters should be swapped: > > if (strstr(system_types[machtype], str)) { > Acked. thanks! Wu Zhangjin > > > + mips_machtype = machtype; > > + break; > > } > > - } > > - return -1; > > + return 0; > > } > > > > -__setup("machtype=", machname_setup); > > +__setup("machtype=", machtype_setup); > >