[U-Boot] [PATCH] cmd: part: use MAX_SEARCH_PARTITIONS for part search

Use Macro instead of hard code.
Signed-off-by: Kever Yang kever.yang@rock-chips.com ---
cmd/part.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmd/part.c b/cmd/part.c index bee204fff0..bfb6488b0f 100644 --- a/cmd/part.c +++ b/cmd/part.c @@ -90,7 +90,7 @@ static int do_part_list(int argc, char * const argv[]) char str[512] = { '\0', }; disk_partition_t info;
- for (p = 1; p < 128; p++) { + for (p = 1; p < MAX_SEARCH_PARTITIONS; p++) { char t[5]; int r = part_get_info(desc, p, &info);

On 7 Sep 2018, at 11:37, Kever Yang kever.yang@rock-chips.com wrote:
Use Macro instead of hard code.
Nitpick: mentioning where the macro is defined (and if it was recently introduced, what commit this references) would be helpful in a cursory review. I just ran a 'git grep’ instead ;-)
Signed-off-by: Kever Yang kever.yang@rock-chips.com
Reviewed-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com

On Fri, Sep 07, 2018 at 05:37:36PM +0800, Kever Yang wrote:
Use Macro instead of hard code.
Signed-off-by: Kever Yang kever.yang@rock-chips.com Reviewed-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com
Applied to u-boot/master, thanks!
participants (3)
-
Dr. Philipp Tomsich
-
Kever Yang
-
Tom Rini