|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH] lib: drop debug_build()
Its expansion shouldn't be tied to NDEBUG - down the road we may want to
allow enabling assertions independently of CONFIG_DEBUG. Replace the few
uses by IS_ENABLED(CONFIG_DEBUG).
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
I wonder whether we shouldn't further abstract this into, say, a
xen_build_info() helper, seeing that all use sites want "debug=[yn]".
This could then also include gcov_string right away.
--- a/xen/arch/arm/traps.c
+++ b/xen/arch/arm/traps.c
@@ -182,7 +182,7 @@ static void print_xen_info(void)
#else
"arm64",
#endif
- debug_build() ? 'y' : 'n', print_tainted(taint_str));
+ IS_ENABLED(CONFIG_DEBUG) ? 'y' : 'n', print_tainted(taint_str));
}
#ifdef CONFIG_ARM_32
--- a/xen/arch/x86/x86_64/traps.c
+++ b/xen/arch/x86/x86_64/traps.c
@@ -31,7 +31,7 @@ static void print_xen_info(void)
printk("----[ Xen-%d.%d%s x86_64 debug=%c " gcov_string " %s ]----\n",
xen_major_version(), xen_minor_version(), xen_extra_version(),
- debug_build() ? 'y' : 'n', print_tainted(taint_str));
+ IS_ENABLED(CONFIG_DEBUG) ? 'y' : 'n', print_tainted(taint_str));
}
enum context { CTXT_hypervisor, CTXT_pv_guest, CTXT_hvm_guest };
--- a/xen/drivers/char/console.c
+++ b/xen/drivers/char/console.c
@@ -1004,8 +1004,8 @@ void __init console_init_preirq(void)
spin_unlock(&console_lock);
printk("Xen version %d.%d%s (%s@%s) (%s) debug=%c " gcov_string " %s\n",
xen_major_version(), xen_minor_version(), xen_extra_version(),
- xen_compile_by(), xen_compile_domain(),
- xen_compiler(), debug_build() ? 'y' : 'n', xen_compile_date());
+ xen_compile_by(), xen_compile_domain(), xen_compiler(),
+ IS_ENABLED(CONFIG_DEBUG) ? 'y' : 'n', xen_compile_date());
printk("Latest ChangeSet: %s\n", xen_changeset());
/* Locate and print the buildid, if applicable. */
--- a/xen/include/xen/lib.h
+++ b/xen/include/xen/lib.h
@@ -52,11 +52,9 @@
#define ASSERT(p) \
do { if ( unlikely(!(p)) ) assert_failed(#p); } while (0)
#define ASSERT_UNREACHABLE() assert_failed("unreachable")
-#define debug_build() 1
#else
#define ASSERT(p) do { if ( 0 && (p) ) {} } while (0)
#define ASSERT_UNREACHABLE() do { } while (0)
-#define debug_build() 0
#endif
#define ABS(_x) ({ \
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |