Both __warn() and __bug() take as first parameter the file name of the
current compilation unit (__FILE__). Mark that parameter as constant to
better reflect that.
Signed-off-by: Mihai Donțu <mdontu@bitdefender.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
machine_restart(5000);
}
-void __bug(char *file, int line)
+void __bug(const char *file, int line)
{
console_start_sync();
printk("Xen BUG at %s:%d\n", file, line);
panic("Xen BUG at %s:%d", file, line);
}
-void __warn(char *file, int line)
+void __warn(const char *file, int line)
{
printk("Xen WARN at %s:%d\n", file, line);
dump_execution_state();
#include <xen/string.h>
#include <asm/bug.h>
-void noreturn __bug(char *file, int line);
-void __warn(char *file, int line);
+void noreturn __bug(const char *file, int line);
+void __warn(const char *file, int line);
#define BUG_ON(p) do { if (unlikely(p)) BUG(); } while (0)
#define WARN_ON(p) do { if (unlikely(p)) WARN(); } while (0)