linux-mips
[Top] [All Lists]

[PATCH] arch/mips/loongson/common/mem.c: fix phys_mem_access_prot() chec

To: linux-mips@linux-mips.org
Subject: [PATCH] arch/mips/loongson/common/mem.c: fix phys_mem_access_prot() check
From: Arnaud Patard <apatard@mandriva.com>
Date: Thu, 29 Apr 2010 11:58:49 +0200
Organization: Mandriva
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
The check used to determine if uncached accelerated should be used or
not is wrong. The parenthesis are misplaced and making the test fail.

Signed-off-by: Arnaud Patard <apatard@mandriva.com>
---
Index: linux-2.6/arch/mips/loongson/common/mem.c
===================================================================
--- linux-2.6.orig/arch/mips/loongson/common/mem.c
+++ linux-2.6/arch/mips/loongson/common/mem.c
@@ -75,7 +75,7 @@ pgprot_t phys_mem_access_prot(struct fil
        unsigned long end = offset + size;
 
        if (__uncached_access(file, offset)) {
-               if (((uca_start && offset) >= uca_start) &&
+               if (uca_start && (offset >= uca_start) &&
                    (end <= uca_end))
                        return __pgprot((pgprot_val(vma_prot) &
                                         ~_CACHE_MASK) |
<Prev in Thread] Current Thread [Next in Thread>