linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.cz>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: mm-commits@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, linux-fsdevel@vger.kernel.org,
	linux-next@vger.kernel.org, sfr@canb.auug.org.au,
	Sasha Levin <sasha.levin@oracle.com>
Subject: [PATCH] mm, debug: mm-introduce-vm_bug_on_mm-fix-fix.patch
Date: Tue, 23 Sep 2014 13:28:48 +0200	[thread overview]
Message-ID: <20140923112848.GA10046@dhcp22.suse.cz> (raw)
In-Reply-To: <1411464279-20158-1-git-send-email-mhocko@suse.cz>

And there is another one hitting during randconfig. The patch makes my
eyes bleed but I don't know about other way without breaking out the
thing into separate parts sounds worse because we can mix with other
messages then.
---
>From 9df0782835e7bde769f8721cfe2b13b9f1dafa9a Mon Sep 17 00:00:00 2001
From: Michal Hocko <mhocko@suse.cz>
Date: Tue, 23 Sep 2014 12:55:18 +0200
Subject: [PATCH] mm, debug: introduce-vm_bug_on_mm-fix-fix.patch
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

dump_mm will fail to compile if the last config options are not defined.
I have hit the following (trimmed down) while doing randconfig:
mm/debug.c: In function ‘dump_mm’:
mm/debug.c:197:3: error: expected ‘)’ before ‘mm’
   mm, mm->mmap, mm->vmacache_seqnum, mm->task_size,
   ^
include/linux/printk.h:221:21: note: in definition of macro ‘pr_fmt’
 #define pr_fmt(fmt) fmt
                     ^
mm/debug.c:169:2: note: in expansion of macro ‘pr_emerg’
  pr_emerg("mm %p mmap %p seqnum %d task_size %lu\n"

with neither CONFIG_COMPACTION nor CONFIG_NUMA_BALANCING set because
the last format string portion will not have a comma separating other
parameters. There is also a trailing comma at the end of parameters
list.

Fix this by being careful to place commas before mm as the first known
unconditional paramter after formatting patch and also before the last
conditional parameters rather at their end.

Signed-off-by: Michal Hocko <mhocko@suse.cz>
---
 mm/debug.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/mm/debug.c b/mm/debug.c
index 63aba9dcfb4e..d21b7e6b4bbc 100644
--- a/mm/debug.c
+++ b/mm/debug.c
@@ -192,9 +192,9 @@ void dump_mm(const struct mm_struct *mm)
 		"numa_next_scan %lu numa_scan_offset %lu numa_scan_seq %d\n"
 #endif
 #if defined(CONFIG_NUMA_BALANCING) || defined(CONFIG_COMPACTION)
-		"tlb_flush_pending %d\n",
+		"tlb_flush_pending %d\n"
 #endif
-		mm, mm->mmap, mm->vmacache_seqnum, mm->task_size,
+		, mm, mm->mmap, mm->vmacache_seqnum, mm->task_size,
 #ifdef CONFIG_MMU
 		mm->get_unmapped_area,
 #endif
@@ -215,15 +215,15 @@ void dump_mm(const struct mm_struct *mm)
 #ifdef CONFIG_MEMCG
 		mm->owner,
 #endif
-		mm->exe_file,
+		mm->exe_file
 #ifdef CONFIG_MMU_NOTIFIER
-		mm->mmu_notifier_mm,
+		, mm->mmu_notifier_mm
 #endif
 #ifdef CONFIG_NUMA_BALANCING
-		mm->numa_next_scan, mm->numa_scan_offset, mm->numa_scan_seq,
+		, mm->numa_next_scan, mm->numa_scan_offset, mm->numa_scan_seq
 #endif
 #if defined(CONFIG_NUMA_BALANCING) || defined(CONFIG_COMPACTION)
-		mm->tlb_flush_pending
+		, mm->tlb_flush_pending
 #endif
 		);
 
-- 
2.1.0

-- 
Michal Hocko
SUSE Labs

--
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:[~2014-09-23 11:28 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-23  0:02 mmotm 2014-09-22-16-57 uploaded akpm
2014-09-23  0:39 ` Stephen Rothwell
2014-09-23  1:12   ` Andrew Morton
2014-09-23  9:24 ` [PATCH] mm, debug: mm-introduce-vm_bug_on_mm-fix.patch Michal Hocko
2014-09-23 11:28   ` Michal Hocko [this message]
2014-09-23 16:19     ` [PATCH] mm, debug: mm-introduce-vm_bug_on_mm-fix-fix.patch Valdis.Kletnieks
2014-09-23 20:52       ` Andrew Morton
2014-09-24  7:09         ` Michal Hocko
2014-09-23 20:12     ` Dave Jones
2014-09-23 19:02 ` mmotm 2014-09-22-16-57 uploaded Guenter Roeck
2014-09-23 20:01   ` Andrew Morton
2014-09-23 20:13     ` Fabio Estevam
2014-09-23 20:20     ` Naoya Horiguchi
2014-09-23 20:38     ` Guenter Roeck
2014-09-23 21:08       ` Anish Bhatt
2014-09-23 20:31   ` Randy Dunlap
2014-09-23 20:57     ` Guenter Roeck
2014-09-23 21:36       ` Randy Dunlap
2014-09-23 21:53         ` Guenter Roeck
2014-09-24  4:34           ` Guenter Roeck
2014-09-24  6:24             ` David Miller
2014-09-24  7:18             ` Geert Uytterhoeven

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=20140923112848.GA10046@dhcp22.suse.cz \
    --to=mhocko@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mm-commits@vger.kernel.org \
    --cc=sasha.levin@oracle.com \
    --cc=sfr@canb.auug.org.au \
    /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).