[PATCH v2] mtd: cmdlinepart: fix the wrong check condition
Artem Bityutskiy
dedekind1 at gmail.com
Sun Sep 2 06:56:42 EDT 2012
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 at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20120902/5fe1e8a2/attachment.sig>
More information about the linux-mtd
mailing list