]> git.baikalelectronics.ru Git - kernel.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>
Thu, 15 Nov 2012 13:37:45 +0000 (15:37 +0200)
commit4b33536b583a0d423eff17af5418e47e6adffd67
tree22dfe6e013b16e8d732e6663faf7514d8377a295
parent376b77e908d62e18e6429a7963c588a2c55b7e1c
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