[PATCH v2] mtd: cmdlinepart: Simplify parse_cmdline_partitions

Artem Bityutskiy dedekind1 at gmail.com
Wed Oct 10 08:49:18 EDT 2012


On Sun, 2012-09-23 at 09:52 +0200, Shmulik Ladkani wrote:
> From: Shmulik Ladkani <shmulik.ladkani at gmail.com>
> 
> Simply 'parse_cmdline_partitions': the outer loop iterating over
> 'partitions' is actually a search loop, it does not execute the inner
> loop for each partition, only for the matched partition.
> 
> Let's break when search is successful, and move all inner code (relevant
> only for the matched partition) outside of the outer loop.
> 
> Resulting code is much more readable, and makes the indent level sane.
> 
> Signed-off-by: Shmulik Ladkani <shmulik.ladkani at gmail.com>

Pushed to l2-mtd.git, thanks!

-- 
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/20121010/eebb92fc/attachment.sig>


More information about the linux-mtd mailing list