mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Jesper Juhl <jj@chaosbits.net>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	eric.dumazet@gmail.com, mel@csn.ul.ie, hannes@cmpxchg.org,
	hughd@google.com, riel@redhat.com, jj@chaosbits.net,
	aarcange@redhat.com, tglx@linutronix.de,
	kamezawa.hiroyu@jp.fujitsu.com, walken@google.com, mingo@elte.hu
Subject: [tip:x86/cleanups] x86: Use "do { } while(0)" for empty flush_tlb_fix_spurious_fault() macro
Date: Sun, 18 Dec 2011 15:50:45 -0800	[thread overview]
Message-ID: <tip-2ac13462b6d242684996e88a07fbed6dec6af622@git.kernel.org> (raw)
In-Reply-To: <alpine.LNX.2.00.1112180128070.21784@swampdragon.chaosbits.net>

Commit-ID:  2ac13462b6d242684996e88a07fbed6dec6af622
Gitweb:     http://git.kernel.org/tip/2ac13462b6d242684996e88a07fbed6dec6af622
Author:     Jesper Juhl <jj@chaosbits.net>
AuthorDate: Sun, 18 Dec 2011 01:32:09 +0100
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Sun, 18 Dec 2011 09:14:18 +0100

x86: Use "do { } while(0)" for empty flush_tlb_fix_spurious_fault() macro

If one builds the kernel with -Wempty-body one gets this
warning:

  mm/memory.c:3432:46: warning: suggest braces around empty body in an ¡if¢ statement [-Wempty-body]

due to the fact that 'flush_tlb_fix_spurious_fault' is a macro
that can sometimes be defined to nothing.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: linux-mm@kvack.org
Cc: Michel Lespinasse <walken@google.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Link: http://lkml.kernel.org/r/alpine.LNX.2.00.1112180128070.21784@swampdragon.chaosbits.net
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/include/asm/pgtable.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index 18601c8..49afb3f 100644
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -703,7 +703,7 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm,
 	pte_update(mm, addr, ptep);
 }
 
-#define flush_tlb_fix_spurious_fault(vma, address)
+#define flush_tlb_fix_spurious_fault(vma, address) do { } while (0)
 
 #define mk_pmd(page, pgprot)   pfn_pmd(page_to_pfn(page), (pgprot))
 

      parent reply	other threads:[~2011-12-18 23:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-18  0:32 [PATCH] Use 'do {} while (0)' " Jesper Juhl
2011-12-18  0:43 ` Michel Lespinasse
2011-12-18  1:00   ` Jesper Juhl
2011-12-18 23:50 ` tip-bot for Jesper Juhl [this message]

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=tip-2ac13462b6d242684996e88a07fbed6dec6af622@git.kernel.org \
    --to=jj@chaosbits.net \
    --cc=aarcange@redhat.com \
    --cc=eric.dumazet@gmail.com \
    --cc=hannes@cmpxchg.org \
    --cc=hpa@zytor.com \
    --cc=hughd@google.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mel@csn.ul.ie \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=riel@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=walken@google.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

Powered by JetHome