From: Mihai Donțu Date: Wed, 7 Jan 2015 10:11:27 +0000 (+0100) Subject: console: const-ify the arguments for __warn() and __bug() X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~3980 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e293dd6e80bc6e624d6222ae13331958eb47116a;p=xen.git console: const-ify the arguments for __warn() and __bug() 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 Reviewed-by: Andrew Cooper --- diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c index 0b8d3d4a4d..cb0c2d6f00 100644 --- a/xen/drivers/char/console.c +++ b/xen/drivers/char/console.c @@ -1150,7 +1150,7 @@ void panic(const char *fmt, ...) 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); @@ -1158,7 +1158,7 @@ void __bug(char *file, int 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(); diff --git a/xen/include/xen/lib.h b/xen/include/xen/lib.h index f11b49e6dc..8f9cadbc4d 100644 --- a/xen/include/xen/lib.h +++ b/xen/include/xen/lib.h @@ -8,8 +8,8 @@ #include #include -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)