Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1231867 > unrolled thread

[PATCH V2] kexec: Use file name as the output message prefix

Started byMinfei Huang <mnfhuang@gmail.com>
First post2015-09-24 08:10 +0200
Last post2015-09-25 08:10 +0200
Articles 4 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH V2] kexec: Use file name as the output message prefix Minfei Huang <mnfhuang@gmail.com> - 2015-09-24 08:10 +0200
    Re: [PATCH V2] kexec: Use file name as the output message prefix Dave Young <dyoung@redhat.com> - 2015-09-25 07:10 +0200
      Re: [PATCH V2] kexec: Use file name as the output message prefix Dave Young <dyoung@redhat.com> - 2015-09-25 07:30 +0200
        Re: [PATCH V2] kexec: Use file name as the output message prefix Minfei Huang <mnfhuang@gmail.com> - 2015-09-25 08:10 +0200

#1231867 — [PATCH V2] kexec: Use file name as the output message prefix

FromMinfei Huang <mnfhuang@gmail.com>
Date2015-09-24 08:10 +0200
Subject[PATCH V2] kexec: Use file name as the output message prefix
Message-ID<qc7Tb-2Wj-1@gated-at.bofh.it>
kexec output message misses the prefix "kexec", when Dave Young split
the kexec code. Now, we use file name as the output message prefix.

Currectly, the format of output message:
[  140.290795] SYSC_kexec_load: hello, world
[  140.291534] kexec: sanity_check_segment_list: hello, world

Ideally, the format of output message:
[   30.791503] kexec: SYSC_kexec_load, Hello, world
[   79.182752] kexec_core: sanity_check_segment_list, Hello, world

Remove the custom prefix "kexec" in output message.

Signed-off-by: Minfei Huang <mnfhuang@gmail.com>
---
v2: Use KBUILD_MODNAME as prefix, instead of custom string "kexec"
---
 kernel/kexec.c      | 2 ++
 kernel/kexec_core.c | 4 ++--
 kernel/kexec_file.c | 2 ++
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/kernel/kexec.c b/kernel/kexec.c
index 4c5edc3..df772fc 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -18,6 +18,8 @@
 
 #include "kexec_internal.h"
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 static int copy_user_segment_list(struct kimage *image,
 				  unsigned long nr_segments,
 				  struct kexec_segment __user *segments)
diff --git a/kernel/kexec_core.c b/kernel/kexec_core.c
index 201b453..dd21c78 100644
--- a/kernel/kexec_core.c
+++ b/kernel/kexec_core.c
@@ -6,7 +6,7 @@
  * Version 2.  See the file COPYING for more details.
  */
 
-#define pr_fmt(fmt)	"kexec: " fmt
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <linux/capability.h>
 #include <linux/mm.h>
@@ -1027,7 +1027,7 @@ static int __init crash_notes_memory_init(void)
 
 	crash_notes = __alloc_percpu(size, align);
 	if (!crash_notes) {
-		pr_warn("Kexec: Memory allocation for saving cpu register states failed\n");
+		pr_warn("Memory allocation for saving cpu register states failed\n");
 		return -ENOMEM;
 	}
 	return 0;
diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
index 6a9a3f2..66a5dc8 100644
--- a/kernel/kexec_file.c
+++ b/kernel/kexec_file.c
@@ -22,6 +22,8 @@
 #include <linux/vmalloc.h>
 #include "kexec_internal.h"
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 /*
  * Declare these symbols weak so that if architecture provides a purgatory,
  * these will be overridden.
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1232561

FromDave Young <dyoung@redhat.com>
Date2015-09-25 07:10 +0200
Message-ID<qctqG-8vy-7@gated-at.bofh.it>
In reply to#1231867
On 09/24/15 at 02:07pm, Minfei Huang wrote:
> kexec output message misses the prefix "kexec", when Dave Young split
> the kexec code. Now, we use file name as the output message prefix.
> 
> Currectly, the format of output message:
> [  140.290795] SYSC_kexec_load: hello, world
> [  140.291534] kexec: sanity_check_segment_list: hello, world
> 
> Ideally, the format of output message:
> [   30.791503] kexec: SYSC_kexec_load, Hello, world
> [   79.182752] kexec_core: sanity_check_segment_list, Hello, world
> 
> Remove the custom prefix "kexec" in output message.
> 
> Signed-off-by: Minfei Huang <mnfhuang@gmail.com>
> ---
> v2: Use KBUILD_MODNAME as prefix, instead of custom string "kexec"
> ---
>  kernel/kexec.c      | 2 ++
>  kernel/kexec_core.c | 4 ++--
>  kernel/kexec_file.c | 2 ++
>  3 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/kexec.c b/kernel/kexec.c
> index 4c5edc3..df772fc 100644
> --- a/kernel/kexec.c
> +++ b/kernel/kexec.c
> @@ -18,6 +18,8 @@
>  
>  #include "kexec_internal.h"
>  
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> +

Move the micro to the top of the c file is better, ditto for other two files.

Otherwise:
Acked-by: Dave Young <dyoung@redhat.com>

>  static int copy_user_segment_list(struct kimage *image,
>  				  unsigned long nr_segments,
>  				  struct kexec_segment __user *segments)
> diff --git a/kernel/kexec_core.c b/kernel/kexec_core.c
> index 201b453..dd21c78 100644
> --- a/kernel/kexec_core.c
> +++ b/kernel/kexec_core.c
> @@ -6,7 +6,7 @@
>   * Version 2.  See the file COPYING for more details.
>   */
>  
> -#define pr_fmt(fmt)	"kexec: " fmt
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
>  
>  #include <linux/capability.h>
>  #include <linux/mm.h>
> @@ -1027,7 +1027,7 @@ static int __init crash_notes_memory_init(void)
>  
>  	crash_notes = __alloc_percpu(size, align);
>  	if (!crash_notes) {
> -		pr_warn("Kexec: Memory allocation for saving cpu register states failed\n");
> +		pr_warn("Memory allocation for saving cpu register states failed\n");
>  		return -ENOMEM;
>  	}
>  	return 0;
> diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
> index 6a9a3f2..66a5dc8 100644
> --- a/kernel/kexec_file.c
> +++ b/kernel/kexec_file.c
> @@ -22,6 +22,8 @@
>  #include <linux/vmalloc.h>
>  #include "kexec_internal.h"
>  
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> +
>  /*
>   * Declare these symbols weak so that if architecture provides a purgatory,
>   * these will be overridden.
> -- 
> 1.9.1
> 

Thanks
Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1232567

FromDave Young <dyoung@redhat.com>
Date2015-09-25 07:30 +0200
Message-ID<qctK2-qx-3@gated-at.bofh.it>
In reply to#1232561
On 09/25/15 at 01:04pm, Dave Young wrote:
> On 09/24/15 at 02:07pm, Minfei Huang wrote:
> > kexec output message misses the prefix "kexec", when Dave Young split
> > the kexec code. Now, we use file name as the output message prefix.
> > 
> > Currectly, the format of output message:

s/Currectly/Currently

> > [  140.290795] SYSC_kexec_load: hello, world
> > [  140.291534] kexec: sanity_check_segment_list: hello, world
> > 
> > Ideally, the format of output message:
> > [   30.791503] kexec: SYSC_kexec_load, Hello, world
> > [   79.182752] kexec_core: sanity_check_segment_list, Hello, world
> > 
> > Remove the custom prefix "kexec" in output message.
> > 
> > Signed-off-by: Minfei Huang <mnfhuang@gmail.com>
> > ---
> > v2: Use KBUILD_MODNAME as prefix, instead of custom string "kexec"
> > ---
> >  kernel/kexec.c      | 2 ++
> >  kernel/kexec_core.c | 4 ++--
> >  kernel/kexec_file.c | 2 ++
> >  3 files changed, 6 insertions(+), 2 deletions(-)
> > 
> > diff --git a/kernel/kexec.c b/kernel/kexec.c
> > index 4c5edc3..df772fc 100644
> > --- a/kernel/kexec.c
> > +++ b/kernel/kexec.c
> > @@ -18,6 +18,8 @@
> >  
> >  #include "kexec_internal.h"
> >  
> > +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> > +
> 
> Move the micro to the top of the c file is better, ditto for other two files.

s/micro/macro

> 
> Otherwise:
> Acked-by: Dave Young <dyoung@redhat.com>
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1232585

FromMinfei Huang <mnfhuang@gmail.com>
Date2015-09-25 08:10 +0200
Message-ID<qcumK-1oz-11@gated-at.bofh.it>
In reply to#1232567
On 09/25/15 at 01:24pm, Dave Young wrote:
> On 09/25/15 at 01:04pm, Dave Young wrote:
> > On 09/24/15 at 02:07pm, Minfei Huang wrote:
> > > kexec output message misses the prefix "kexec", when Dave Young split
> > > the kexec code. Now, we use file name as the output message prefix.
> > > 
> > > Currectly, the format of output message:
> 
> s/Currectly/Currently
> 
> > > [  140.290795] SYSC_kexec_load: hello, world
> > > [  140.291534] kexec: sanity_check_segment_list: hello, world
> > > 
> > > Ideally, the format of output message:
> > > [   30.791503] kexec: SYSC_kexec_load, Hello, world
> > > [   79.182752] kexec_core: sanity_check_segment_list, Hello, world
> > > 
> > > Remove the custom prefix "kexec" in output message.
> > > 
> > > Signed-off-by: Minfei Huang <mnfhuang@gmail.com>
> > > ---
> > > v2: Use KBUILD_MODNAME as prefix, instead of custom string "kexec"
> > > ---
> > >  kernel/kexec.c      | 2 ++
> > >  kernel/kexec_core.c | 4 ++--
> > >  kernel/kexec_file.c | 2 ++
> > >  3 files changed, 6 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/kernel/kexec.c b/kernel/kexec.c
> > > index 4c5edc3..df772fc 100644
> > > --- a/kernel/kexec.c
> > > +++ b/kernel/kexec.c
> > > @@ -18,6 +18,8 @@
> > >  
> > >  #include "kexec_internal.h"
> > >  
> > > +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> > > +
> > 
> > Move the micro to the top of the c file is better, ditto for other two files.
> 
> s/micro/macro
> 

Thanks, Dave.

I will post next version to correct them.

Thanks
Minfei

> > 
> > Otherwise:
> > Acked-by: Dave Young <dyoung@redhat.com>
> > 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web