All of lore.kernel.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Cc: dwmw2@infradead.org, Huang Shijie <shijie8@gmail.com>,
	linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org
Subject: Re: [PATCH v2] mtd: cmdlinepart: fix the wrong check condition
Date: Sun, 02 Sep 2012 13:56:42 +0300	[thread overview]
Message-ID: <1346583402.2533.0.camel@kyv> (raw)
In-Reply-To: <20120825123149.3fafa4f4@halley>

[-- Attachment #1: Type: text/plain, Size: 1163 bytes --]

On Sat, 2012-08-25 at 12:31 +0300, Shmulik Ladkani wrote:
> Hi Huang, Artem,
> 
> On Sat, 25 Aug 2012 16:06:50 -0400 Huang Shijie <shijie8@gmail.com> wrote:
> > diff --git a/drivers/mtd/cmdlinepart.c b/drivers/mtd/cmdlinepart.c
> > index fc960a3..216d751 100644
> > --- a/drivers/mtd/cmdlinepart.c
> > +++ b/drivers/mtd/cmdlinepart.c
> > @@ -322,13 +322,16 @@ static int parse_cmdline_partitions(struct mtd_info *master,
> >  	struct cmdline_mtd_partition *part;
> >  	const char *mtd_id = master->name;
> >  
> > +	if (!mtd_id)
> > +		return 0;
> > +
> >  	/* parse command line */
> >  	if (!cmdline_parsed)
> >  		mtdpart_setup_real(cmdline);
> >  
> >  	for(part = partitions; part; part = part->next)
> >  	{
> > -		if ((!mtd_id) || (!strcmp(part->mtd_id, mtd_id)))
> > +		if (!strcmp(part->mtd_id, mtd_id))
> >  		{
> >  			for(i = 0, offset = 0; i < part->num_parts; i++)
> >  			{
> 
> This changes the behavior of cmdling parsing, which might affect users
> expecting the old behavior.

Yes, you are right, we should not change the mtd_id hack unless we have
checked all the users.

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Cc: Huang Shijie <shijie8@gmail.com>,
	dwmw2@infradead.org, linux-mtd@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] mtd: cmdlinepart: fix the wrong check condition
Date: Sun, 02 Sep 2012 13:56:42 +0300	[thread overview]
Message-ID: <1346583402.2533.0.camel@kyv> (raw)
In-Reply-To: <20120825123149.3fafa4f4@halley>

[-- Attachment #1: Type: text/plain, Size: 1163 bytes --]

On Sat, 2012-08-25 at 12:31 +0300, Shmulik Ladkani wrote:
> Hi Huang, Artem,
> 
> On Sat, 25 Aug 2012 16:06:50 -0400 Huang Shijie <shijie8@gmail.com> wrote:
> > diff --git a/drivers/mtd/cmdlinepart.c b/drivers/mtd/cmdlinepart.c
> > index fc960a3..216d751 100644
> > --- a/drivers/mtd/cmdlinepart.c
> > +++ b/drivers/mtd/cmdlinepart.c
> > @@ -322,13 +322,16 @@ static int parse_cmdline_partitions(struct mtd_info *master,
> >  	struct cmdline_mtd_partition *part;
> >  	const char *mtd_id = master->name;
> >  
> > +	if (!mtd_id)
> > +		return 0;
> > +
> >  	/* parse command line */
> >  	if (!cmdline_parsed)
> >  		mtdpart_setup_real(cmdline);
> >  
> >  	for(part = partitions; part; part = part->next)
> >  	{
> > -		if ((!mtd_id) || (!strcmp(part->mtd_id, mtd_id)))
> > +		if (!strcmp(part->mtd_id, mtd_id))
> >  		{
> >  			for(i = 0, offset = 0; i < part->num_parts; i++)
> >  			{
> 
> This changes the behavior of cmdling parsing, which might affect users
> expecting the old behavior.

Yes, you are right, we should not change the mtd_id hack unless we have
checked all the users.

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2012-09-02 10:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-25 20:06 [PATCH v2] mtd: cmdlinepart: fix the wrong check condition Huang Shijie
2012-08-25 20:06 ` Huang Shijie
2012-08-25  9:31 ` Shmulik Ladkani
2012-08-25  9:31   ` Shmulik Ladkani
2012-08-26  7:52   ` Huang Shijie
2012-08-26  7:52     ` Huang Shijie
2012-09-02 10:56   ` Artem Bityutskiy [this message]
2012-09-02 10:56     ` Artem Bityutskiy

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=1346583402.2533.0.camel@kyv \
    --to=dedekind1@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=shijie8@gmail.com \
    --cc=shmulik.ladkani@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.