console: const-ify the arguments for __warn() and __bug()
authorMihai Donțu <mdontu@bitdefender.com>
Wed, 7 Jan 2015 10:11:27 +0000 (11:11 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 7 Jan 2015 10:11:27 +0000 (11:11 +0100)
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>
xen/drivers/char/console.c
xen/include/xen/lib.h

index 0b8d3d4a4d488c01c85eb1f687511d7414e7ee80..cb0c2d6f00e53faf2b112a8c6ce93749649c443b 100644 (file)
@@ -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();
index f11b49e6dcbb06c361e0b63b54f18eb68822d360..8f9cadbc4d8f55fa6d18732996813c4f2a70e724 100644 (file)
@@ -8,8 +8,8 @@
 #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)