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)) { > + mips_machtype = machtype; > + break; > } > - } > - return -1; > + return 0; > } > > -__setup("machtype=", machname_setup); > +__setup("machtype=", machtype_setup); -- Zhang, Le Gentoo/Loongson Developer http://zhangle.is-a-geek.org 0260 C902 B8F8 6506 6586 2B90 BC51 C808 1E4E 2973
Attachment:
pgphFRe0yCjQv.pgp
Description: PGP signature