* [PATCH] console: const-ify the arguments for __warn() and __bug()
@ 2014-12-08 0:19 Mihai Donțu
2014-12-08 10:28 ` Andrew Cooper
0 siblings, 1 reply; 4+ messages in thread
From: Mihai Donțu @ 2014-12-08 0:19 UTC (permalink / raw)
To: xen-devel
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>
---
xen/drivers/char/console.c | 4 ++--
xen/include/xen/lib.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
index 2f03259..7807cf2 100644
--- a/xen/drivers/char/console.c
+++ b/xen/drivers/char/console.c
@@ -1138,7 +1138,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);
@@ -1146,7 +1146,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 f11b49e..8f9cadb 100644
--- a/xen/include/xen/lib.h
+++ b/xen/include/xen/lib.h
@@ -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)
--
2.2.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] console: const-ify the arguments for __warn() and __bug()
2014-12-08 0:19 [PATCH] console: const-ify the arguments for __warn() and __bug() Mihai Donțu
@ 2014-12-08 10:28 ` Andrew Cooper
2014-12-09 17:55 ` Mihai Donțu
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Cooper @ 2014-12-08 10:28 UTC (permalink / raw)
To: Mihai Donțu, xen-devel
On 08/12/14 00:19, Mihai Donțu wrote:
> 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>
This seems reasonable, but for 4.6 at this point.
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
In future, please CC the relevant maintainers (scrips/get_maintainer.pl
should help)
> ---
> xen/drivers/char/console.c | 4 ++--
> xen/include/xen/lib.h | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
> index 2f03259..7807cf2 100644
> --- a/xen/drivers/char/console.c
> +++ b/xen/drivers/char/console.c
> @@ -1138,7 +1138,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);
> @@ -1146,7 +1146,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 f11b49e..8f9cadb 100644
> --- a/xen/include/xen/lib.h
> +++ b/xen/include/xen/lib.h
> @@ -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)
> --
> 2.2.0
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] console: const-ify the arguments for __warn() and __bug()
2014-12-08 10:28 ` Andrew Cooper
@ 2014-12-09 17:55 ` Mihai Donțu
0 siblings, 0 replies; 4+ messages in thread
From: Mihai Donțu @ 2014-12-09 17:55 UTC (permalink / raw)
To: Andrew Cooper; +Cc: xen-devel
On Monday 08 December 2014 10:28:41 Andrew Cooper wrote:
> On 08/12/14 00:19, Mihai Donțu wrote:
> > 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>
>
> This seems reasonable, but for 4.6 at this point.
>
> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
>
> In future, please CC the relevant maintainers (scrips/get_maintainer.pl
> should help)
Thank you Andrew.
Should I resend the patch with your Reviewed-by and the proper people in
CC?
> > ---
> > xen/drivers/char/console.c | 4 ++--
> > xen/include/xen/lib.h | 4 ++--
> > 2 files changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
> > index 2f03259..7807cf2 100644
> > --- a/xen/drivers/char/console.c
> > +++ b/xen/drivers/char/console.c
> > @@ -1138,7 +1138,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);
> > @@ -1146,7 +1146,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 f11b49e..8f9cadb 100644
> > --- a/xen/include/xen/lib.h
> > +++ b/xen/include/xen/lib.h
> > @@ -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)
--
Mihai DONȚU
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] console: const-ify the arguments for __warn() and __bug()
@ 2014-12-10 12:22 Mihai Donțu
0 siblings, 0 replies; 4+ messages in thread
From: Mihai Donțu @ 2014-12-10 12:22 UTC (permalink / raw)
To: xen-devel; +Cc: keir, ian.campbell, andrew.cooper3, ian.jackson, tim, jbeulich
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 | 4 ++--
xen/include/xen/lib.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
index 2f03259..7807cf2 100644
--- a/xen/drivers/char/console.c
+++ b/xen/drivers/char/console.c
@@ -1138,7 +1138,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);
@@ -1146,7 +1146,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 f11b49e..8f9cadb 100644
--- a/xen/include/xen/lib.h
+++ b/xen/include/xen/lib.h
@@ -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)
--
2.2.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-12-10 12:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-08 0:19 [PATCH] console: const-ify the arguments for __warn() and __bug() Mihai Donțu
2014-12-08 10:28 ` Andrew Cooper
2014-12-09 17:55 ` Mihai Donțu
-- strict thread matches above, loose matches on Subject: below --
2014-12-10 12:22 Mihai Donțu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.