mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Petr Mladek <pmladek@suse.com>
To: zhe.he@windriver.com
Cc: sergey.senozhatsky@gmail.com, rostedt@goodmis.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/2] printk: Add KBUILD_MODNAME and correct wrong casting
Date: Tue, 25 Sep 2018 13:34:48 +0200	[thread overview]
Message-ID: <20180925113448.znikvm7bwz5hbwpc@pathway.suse.cz> (raw)
In-Reply-To: <1537630852-247674-2-git-send-email-zhe.he@windriver.com>

On Sat 2018-09-22 23:40:52, zhe.he@windriver.com wrote:
> From: He Zhe <zhe.he@windriver.com>
> 
> Add KBUILD_MODNAME to make prints more clear and correct wrong casting that
> might cut off the normal output.
> 
> Signed-off-by: He Zhe <zhe.he@windriver.com>
> Cc: pmladek@suse.com
> Cc: sergey.senozhatsky@gmail.com
> Cc: rostedt@goodmis.org
> ---
> v2:
> Correct one more place
> v3:
> Correct wrong casting
> 
>  kernel/printk/printk.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
> index d9821c0..6b059a0 100644
> --- a/kernel/printk/printk.c
> +++ b/kernel/printk/printk.c
> @@ -16,6 +16,8 @@
>   *	01Mar01 Andrew Morton
>   */
>  
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> +

This patch should remove all explicit prefixes to avoid duplication.
I see one:

	pr_info("printk: continuation disabled due to ext consoles, expect more fragments in /dev/kmsg\n");


>  #include <linux/kernel.h>
>  #include <linux/mm.h>
>  #include <linux/tty.h>
> @@ -2358,8 +2360,9 @@ void console_unlock(void)
>  		printk_safe_enter_irqsave(flags);
>  		raw_spin_lock(&logbuf_lock);
>  		if (console_seq < log_first_seq) {
> -			len = sprintf(text, "** %u printk messages dropped **\n",
> -				      (unsigned)(log_first_seq - console_seq));
> +			len = sprintf(text,
> +				      "** %llu printk messages dropped **\n",
> +				      log_first_seq - console_seq);

On the contrary, please, put this fix into a separate patch. It is a
candidate for stable backports.

Best Regards,
Petr

  reply	other threads:[~2018-09-25 11:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-22 15:40 [PATCH v3 1/2] printk: Fix panic caused by passing log_buf_len to command line zhe.he
2018-09-22 15:40 ` [PATCH v3 2/2] printk: Add KBUILD_MODNAME and correct wrong casting zhe.he
2018-09-25 11:34   ` Petr Mladek [this message]
2018-09-22 16:19 ` [PATCH v3 1/2] printk: Fix panic caused by passing log_buf_len to command line Steven Rostedt
2018-09-23  6:51   ` He Zhe
2018-09-24 13:11     ` Steven Rostedt
2018-09-25 11:25 ` Petr Mladek
2018-09-25 11:38 ` Sergey Senozhatsky
2018-09-25 11:55   ` Petr Mladek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180925113448.znikvm7bwz5hbwpc@pathway.suse.cz \
    --to=pmladek@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=zhe.he@windriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®