linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Mitchel Humpherys <mitchelh@codeaurora.org>
Cc: Christoph Lameter <cl@linux-foundation.org>,
	Pekka Enberg <penberg@kernel.org>, Matt Mackall <mpm@selenic.com>,
	Joe Perches <joe@perches.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] mm: convert some level-less printks to pr_*
Date: Mon, 14 Apr 2014 15:55:26 -0700	[thread overview]
Message-ID: <20140414155526.96b0832bf4660c026bc3a1d9@linux-foundation.org> (raw)
In-Reply-To: <1395942859-11611-2-git-send-email-mitchelh@codeaurora.org>

On Thu, 27 Mar 2014 10:54:19 -0700 Mitchel Humpherys <mitchelh@codeaurora.org> wrote:

> printk is meant to be used with an associated log level. There are some
> instances of printk scattered around the mm code where the log level is
> missing. Add a log level and adhere to suggestions by
> scripts/checkpatch.pl by moving to the pr_* macros.
> 

hm, this is a functional change.

> --- a/mm/bounce.c
> +++ b/mm/bounce.c
> @@ -3,6 +3,8 @@
>   * - Split from highmem.c
>   */
>  
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

Because of this.

>  #include <linux/mm.h>
>  #include <linux/export.h>
>  #include <linux/swap.h>
> @@ -15,6 +17,7 @@
>  #include <linux/hash.h>
>  #include <linux/highmem.h>
>  #include <linux/bootmem.h>
> +#include <linux/printk.h>
>  #include <asm/tlbflush.h>
>  
>  #include <trace/events/block.h>
> @@ -34,7 +37,7 @@ static __init int init_emergency_pool(void)
>  
>  	page_pool = mempool_create_page_pool(POOL_SIZE, 0);
>  	BUG_ON(!page_pool);
> -	printk("bounce pool size: %d pages\n", POOL_SIZE);
> +	pr_info("bounce pool size: %d pages\n", POOL_SIZE);

This used to print "bounce pool size: N pages" but will now print
"bounce: bounce pool size: N pages".

It isn't necessarily a *bad* change but perhaps a little more thought
could be put into it.  In this example it would be better remove the
redundancy by using 

	pr_info("pool size: %d pages\n"...);

And all of this should be described and justified in the changelog,
please.


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2014-04-14 22:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-27 17:54 [PATCH v2] Some printk cleanup in mm Mitchel Humpherys
2014-03-27 17:54 ` [PATCH v2] mm: convert some level-less printks to pr_* Mitchel Humpherys
2014-03-31 18:35   ` Christoph Lameter
2014-03-31 18:44     ` Joe Perches
2014-04-03 16:33       ` Christoph Lameter
2014-04-03 16:57         ` Mitchel Humpherys
2014-04-14 22:55   ` Andrew Morton [this message]
2014-04-15 23:58     ` Mitchel Humpherys
2014-04-16  0:05       ` Mitchel Humpherys

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=20140414155526.96b0832bf4660c026bc3a1d9@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=cl@linux-foundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mitchelh@codeaurora.org \
    --cc=mpm@selenic.com \
    --cc=penberg@kernel.org \
    /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