]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mtd: cmdlinepart: Simplify parse_cmdline_partitions
authorShmulik Ladkani <shmulik.ladkani@gmail.com>
Sun, 23 Sep 2012 07:52:29 +0000 (09:52 +0200)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Fri, 9 Nov 2012 15:02:51 +0000 (17:02 +0200)
commit2c2693c2de5c7c7511274c3e186e9c47404b8e62
treefb1a1d303bbf23c94cec72d0cb9aec62e58c1dec
parent5ffd3412ae5536a4c57469cb8ea31887121dcb2e
mtd: cmdlinepart: Simplify parse_cmdline_partitions

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@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
drivers/mtd/cmdlinepart.c