linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wu Zhangjin <wuzhangjin@gmail.com>
To: Zhang Le <r0bertz@gentoo.org>
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org,
	Yan Hua <yanh@lemote.com>, Philippe Vachon <philippe@cowpig.ca>,
	Zhang Fuxin <zhangfx@lemote.com>,
	loongson-dev <loongson-dev@googlegroups.com>,
	Liu Junliang <liujl@lemote.com>, Erwan Lerale <erwan@thiscow.com>,
	Arnaud Patard <apatard@mandriva.com>
Subject: Re: [loongson-dev] Re: [loongson-PATCH-v3 17/25] add a machtype kernel command line argument
Date: Thu, 11 Jun 2009 23:16:55 +0800	[thread overview]
Message-ID: <1244733415.10475.67.camel@falcon> (raw)
In-Reply-To: <20090611110914.GB20906@adriano.hkcable.com.hk>

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);
> 
> 

  reply	other threads:[~2009-06-11 15:24 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1244120575.git.wuzj@lemote.com>
2009-06-04 13:03 ` [loongson-PATCH-v3 04/25] change the naming methods wuzhangjin
2009-06-04 13:04 ` [loongson-PATCH-v3 05/25] remove reference to bonito64.h wuzhangjin
2009-06-04 13:04 ` [loongson-PATCH-v3 06/25] divide the files to the smallest logic unit wuzhangjin
2009-06-04 13:04 ` [loongson-PATCH-v3 07/25] replace tons of magic numbers by understandable symbols wuzhangjin
2009-06-04 13:05 ` [loongson-PATCH-v3 08/25] clean up the early printk support for fuloong(2e) wuzhangjin
2009-06-04 13:05 ` [loongson-PATCH-v3 09/25] enable Real Time Clock Support " wuzhangjin
2009-06-04 13:05 ` [loongson-PATCH-v3 10/25] split the loongson-specific part out wuzhangjin
2009-06-09 17:51   ` Zhang Le
2009-06-10 12:39     ` Wu Zhangjin
2009-06-04 13:06 ` [loongson-PATCH-v3 11/25] split env out of cmdline.c wuzhangjin
2009-06-04 13:06 ` [loongson-PATCH-v3 12/25] add basic loongson-2f support wuzhangjin
2009-06-04 13:06 ` [loongson-PATCH-v3 13/25] add basic fuloong(2f) support wuzhangjin
2009-06-04 13:07 ` [loongson-PATCH-v3 14/25] enable serial port support of loongson-based machines wuzhangjin
2009-06-04 13:07 ` [loongson-PATCH-v3 15/25] add basic yeeloong(2f) laptop support wuzhangjin
2009-06-09 17:23   ` Zhang Le
2009-06-10 12:37     ` Wu Zhangjin
2009-06-04 13:07 ` [loongson-PATCH-v3 16/25] enable halt command for yeeloong-7inch laptop wuzhangjin
2009-06-04 13:08 ` [loongson-PATCH-v3 17/25] add a machtype kernel command line argument wuzhangjin
2009-06-04 13:51   ` Arnaud Patard
2009-06-04 16:04     ` Wu Zhangjin
2009-06-10 15:40   ` Zhang Le
2009-06-10 20:31     ` [loongson-dev] " Zhang Le
2009-06-11 11:09       ` Zhang Le
2009-06-11 15:16         ` Wu Zhangjin [this message]
2009-06-11 14:28       ` Wu Zhangjin
2009-06-04 13:08 ` [loongson-PATCH-v3 18/25] Add Siliconmotion 712 framebuffer driver wuzhangjin
2009-06-04 17:18   ` Simon Braunschmidt
2009-06-04 13:09 ` [loongson-PATCH-v3 19/25] define Loongson2F arch specific phys prot access wuzhangjin
2009-06-04 13:09 ` [loongson-PATCH-v3 20/25] Loongson2 specific OProfile driver wuzhangjin
2009-06-04 13:10 ` [loongson-PATCH-v3 21/25] flush posted write to irq wuzhangjin
2009-06-04 13:10 ` [loongson-PATCH-v3 22/25] CS5536 MFGPT as system clock source support wuzhangjin
2009-06-04 13:10 ` [loongson-PATCH-v3 23/25] Loongson2F cpufreq support wuzhangjin
2009-06-04 13:11 ` [loongson-PATCH-v3 24/25] add gcc 4.4 support for MIPS and loongson wuzhangjin
2009-06-04 13:11 ` [loongson-PATCH-v3 25/25] add default kernel config file for loongson-based machines wuzhangjin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1244733415.10475.67.camel@falcon \
    --to=wuzhangjin@gmail.com \
    --cc=apatard@mandriva.com \
    --cc=erwan@thiscow.com \
    --cc=linux-mips@linux-mips.org \
    --cc=liujl@lemote.com \
    --cc=loongson-dev@googlegroups.com \
    --cc=philippe@cowpig.ca \
    --cc=r0bertz@gentoo.org \
    --cc=ralf@linux-mips.org \
    --cc=yanh@lemote.com \
    --cc=zhangfx@lemote.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).