]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
mtdparts: Correct use of debug()
authorSimon Glass <sjg@chromium.org>
Mon, 4 Dec 2017 20:48:21 +0000 (13:48 -0700)
committerTom Rini <trini@konsulko.com>
Thu, 7 Dec 2017 20:17:00 +0000 (15:17 -0500)
The debug() macro now evaluates its expression so does not need #ifdef
protection. In fact the current code causes a warning with the new log
implementation. Adjust the code to fix this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
cmd/mtdparts.c

index 3169c33265ce818aa46d93bd55afe49ae80fdd11..9bc977450cf8910aae84c2b6c225c27f2e651402 100644 (file)
@@ -873,15 +873,12 @@ static int device_parse(const char *const mtd_dev, const char **ret, struct mtd_
                return 1;
        }
 
-#ifdef DEBUG
        pend = strchr(p, ';');
-#endif
        debug("dev type = %d (%s), dev num = %d, mtd-id = %s\n",
                        id->type, MTD_DEV_TYPE(id->type),
                        id->num, id->mtd_id);
        debug("parsing partitions %.*s\n", (int)(pend ? pend - p : strlen(p)), p);
 
-
        /* parse partitions */
        num_parts = 0;