diff mbox series

[U-Boot,v4,05/15] mtdparts: Correct use of debug()

Message ID 20171204204831.98915-6-sjg@chromium.org
State Accepted
Delegated to: Tom Rini
Headers show
Series log: Add a new logging feature | expand

Commit Message

Simon Glass Dec. 4, 2017, 8:48 p.m. UTC
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>
---

Changes in v4: None
Changes in v3: None
Changes in v2: None

 cmd/mtdparts.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Tom Rini Dec. 7, 2017, 10:54 p.m. UTC | #1
On Mon, Dec 04, 2017 at 01:48:21PM -0700, Simon Glass wrote:

> 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>

Applied to u-boot/master, thanks!
diff mbox series

Patch

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;