linux-mips
[Top] [All Lists]

[PATCH] pte_offset(dir,addr): parenthesis fix

To: Ralf Baechle <ralf@linux-mips.org>
Subject: [PATCH] pte_offset(dir,addr): parenthesis fix
From: Franck Bui-Huu <vagabon.xyz@gmail.com>
Date: Tue, 05 Dec 2006 10:39:56 +0100
Cc: linux-mips <linux-mips@linux-mips.org>
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:reply-to:user-agent:mime-version:to:cc:subject:content-type:content-transfer-encoding:from; b=kVRJ7whDkyr7ggJYQqNIeUWQ/s9L7o24yNLvHqwd0kshIuqBSKCSMQvQeZYQyDILLnpIN/AYj0uC2UaxMmo2fm4p+sIDELTl+ukqDFf5q16w5vhXTDHHnwBE3ZYVv6lWM9Kb4MV/PrFmxybkGMocDmJBjW2Sytc2tQS9ySFSeVI=
Original-recipient: rfc822;linux-mips@linux-mips.org
Reply-to: Franck <vagabon.xyz@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Thunderbird 1.5.0.4 (X11/20060614)
From: Franck Bui-Huu <fbuihuu@gmail.com>

This patch adds missing parenthesis around 'dir' argument in
pte_offset() macro definition.

It also removes an extra space in the definition of
pte_offset_kernel() macro.

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
---

 Hi Ralf,
 Could you apply this trivial patch ?

 include/asm-mips/pgtable-32.h |    6 +++---
 include/asm-mips/pgtable-64.h |    4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/asm-mips/pgtable-32.h b/include/asm-mips/pgtable-32.h
index d20f2e9..2fbd47e 100644
--- a/include/asm-mips/pgtable-32.h
+++ b/include/asm-mips/pgtable-32.h
@@ -156,9 +156,9 @@ pfn_pte(unsigned long pfn, pgprot_t prot
 #define __pte_offset(address)                                          \
        (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
 #define pte_offset(dir, address)                                       \
-       ((pte_t *) (pmd_page_vaddr(*dir)) + __pte_offset(address))
-#define pte_offset_kernel(dir, address) \
-       ((pte_t *) pmd_page_vaddr(*(dir)) +  __pte_offset(address))
+       ((pte_t *) pmd_page_vaddr(*(dir)) + __pte_offset(address))
+#define pte_offset_kernel(dir, address)                                        
\
+       ((pte_t *) pmd_page_vaddr(*(dir)) + __pte_offset(address))
 
 #define pte_offset_map(dir, address)                                    \
        ((pte_t *)page_address(pmd_page(*(dir))) + __pte_offset(address))
diff --git a/include/asm-mips/pgtable-64.h b/include/asm-mips/pgtable-64.h
index b9b1e86..a5b1871 100644
--- a/include/asm-mips/pgtable-64.h
+++ b/include/asm-mips/pgtable-64.h
@@ -212,9 +212,9 @@ static inline pmd_t *pmd_offset(pud_t *
 #define __pte_offset(address)                                          \
        (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
 #define pte_offset(dir, address)                                       \
-       ((pte_t *) (pmd_page_vaddr(*dir)) + __pte_offset(address))
+       ((pte_t *) pmd_page_vaddr(*(dir)) + __pte_offset(address))
 #define pte_offset_kernel(dir, address)                                        
\
-       ((pte_t *) pmd_page_vaddr(*(dir)) +  __pte_offset(address))
+       ((pte_t *) pmd_page_vaddr(*(dir)) + __pte_offset(address))
 #define pte_offset_map(dir, address)                                   \
        ((pte_t *)page_address(pmd_page(*(dir))) + __pte_offset(address))
 #define pte_offset_map_nested(dir, address)                            \
-- 
1.4.4.1


<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH] pte_offset(dir,addr): parenthesis fix, Franck Bui-Huu <=