From acc26f85f32c68a51e5cc7b613cd0ea0b0630505 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Fri, 7 Jan 2022 20:50:16 +0200 Subject: Use #if defined(...) when not guard clause --- common/debug.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'common/debug.c') diff --git a/common/debug.c b/common/debug.c index aab5abc..330a3ed 100644 --- a/common/debug.c +++ b/common/debug.c @@ -7,13 +7,13 @@ #include #include -#ifdef DEBUG +#if defined(DEBUG) static struct dbg_info { pm_t dbg_ptr; enum serial_dev dev; } dbg_info = (struct dbg_info){0}; -void init_dbg(void *fdt) +void init_dbg(const void *fdt) { dbg_info = dbg_from_fdt(fdt); } @@ -88,7 +88,7 @@ static enum serial_dev __serial_dev_enum(const char *dev_name) return -1; } -struct dbg_info dbg_from_fdt(void *fdt) +struct dbg_info dbg_from_fdt(const void *fdt) { int chosen_offset = fdt_path_offset(fdt, "/chosen"); const char *stdout = fdt_getprop(fdt, chosen_offset, "stdout-path", NULL); -- cgit v1.3