linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
To: Andrew Morton <akpm@linux-foundation.org>,
	Vlastimil Babka <vbabka@suse.cz>, Rik van Riel <riel@redhat.com>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/5] mm/internal.h: Don't split printk call in two
Date: Tue,  3 Feb 2015 00:50:12 +0100	[thread overview]
Message-ID: <1422921016-27618-2-git-send-email-linux@rasmusvillemoes.dk> (raw)
In-Reply-To: <1422921016-27618-1-git-send-email-linux@rasmusvillemoes.dk>

All users of mminit_dprintk pass a compile-time constant as level, so
this just makes gcc emit a single printk call instead of two.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---

Notes:
    Not a huge deal, since the only users are __init or __meminit
    functions, but even there saving 140 bytes may be worthwhile.

 mm/internal.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/mm/internal.h b/mm/internal.h
index efad241f7014..e1d8e05bcfff 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -329,8 +329,10 @@ extern int mminit_loglevel;
 #define mminit_dprintk(level, prefix, fmt, arg...) \
 do { \
 	if (level < mminit_loglevel) { \
-		printk(level <= MMINIT_WARNING ? KERN_WARNING : KERN_DEBUG); \
-		printk(KERN_CONT "mminit::" prefix " " fmt, ##arg); \
+		if (level <= MMINIT_WARNING) \
+			printk(KERN_WARNING "mminit::" prefix " " fmt, ##arg); \
+		else \
+			printk(KERN_DEBUG "mminit::" prefix " " fmt, ##arg); \
 	} \
 } while (0)
 
-- 
2.1.3

--
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>

  reply	other threads:[~2015-02-02 23:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-02 23:50 [PATCH 0/5] mm: Some .text savings Rasmus Villemoes
2015-02-02 23:50 ` Rasmus Villemoes [this message]
2015-02-02 23:50 ` [PATCH 2/5] mm/page_alloc.c: Pull out init code from build_all_zonelists Rasmus Villemoes
2015-02-03  0:25   ` David Rientjes
2015-02-03  9:57     ` Rasmus Villemoes
2015-02-02 23:50 ` [PATCH 3/5] mm/mm_init.c: Mark mminit_verify_zonelist as __init Rasmus Villemoes
2015-02-02 23:50 ` [PATCH 4/5] mm/mm_init.c: Mark mminit_loglevel __meminitdata Rasmus Villemoes

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=1422921016-27618-2-git-send-email-linux@rasmusvillemoes.dk \
    --to=linux@rasmusvillemoes.dk \
    --cc=akpm@linux-foundation.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=riel@redhat.com \
    --cc=vbabka@suse.cz \
    /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;
as well as URLs for NNTP newsgroup(s).