From: Simon Glass Date: Mon, 4 Dec 2017 20:48:21 +0000 (-0700) Subject: mtdparts: Correct use of debug() X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=95b41b80d77b8418dac3393784b2a9cbb7abef64;p=u-boot.git mtdparts: Correct use of debug() 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 Reviewed-by: Bin Meng --- diff --git a/cmd/mtdparts.c b/cmd/mtdparts.c index 3169c33265..9bc977450c 100644 --- a/cmd/mtdparts.c +++ b/cmd/mtdparts.c @@ -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;