From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx102.postini.com [74.125.245.102]) by kanga.kvack.org (Postfix) with SMTP id 0FADA6B004F for ; Sat, 17 Dec 2011 19:32:11 -0500 (EST) Date: Sun, 18 Dec 2011 01:32:09 +0100 (CET) From: Jesper Juhl Subject: [PATCH] Use 'do {} while (0)' for empty flush_tlb_fix_spurious_fault() macro Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-693025022-1324168117=:21784" Content-ID: Sender: owner-linux-mm@kvack.org List-ID: To: x86@kernel.org Cc: Eric Dumazet , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Michel Lespinasse , Hugh Dickins , Andrea Arcangeli , KAMEZAWA Hiroyuki , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Rik van Riel , Mel Gorman , Johannes Weiner This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-693025022-1324168117=:21784 Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-7 Content-Transfer-Encoding: 8BIT Content-ID: 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 !ifc 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 --- 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..ebe7e76 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)) -- 1.7.8 -- Jesper Juhl http://www.chaosbits.net/ Don't top-post http://www.catb.org/jargon/html/T/top-post.html Plain text mails only, please. --8323328-693025022-1324168117=:21784-- -- 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/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org