From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Mon, 4 Dec 2017 13:48:21 -0700 Subject: [U-Boot] [PATCH v4 05/15] mtdparts: Correct use of debug() In-Reply-To: <20171204204831.98915-1-sjg@chromium.org> References: <20171204204831.98915-1-sjg@chromium.org> Message-ID: <20171204204831.98915-6-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- Changes in v4: None Changes in v3: None Changes in v2: None cmd/mtdparts.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/cmd/mtdparts.c b/cmd/mtdparts.c index 3275eb919b..13677faf4b 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; -- 2.15.0.531.g2ccb3012c9-goog