lkml.org 
[lkml]   [2008]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 0/1]pat: remove redundant condition check
On file pat.c, if (start <= entry->start), it also means (start <
entry->end). This patch removes
redundant condition check.

Signed-off-by: bibo.mao@gmail.com
thanks
bibo,mao

------------------------------------------------------
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
index 2a50e0f..12cac5e 100644
--- a/arch/x86/mm/pat.c
+++ b/arch/x86/mm/pat.c
@@ -305,27 +305,6 @@ int reserve_memtype(u64 start, u64 end, unsigned
long req_type,
struct memtype, nd);
}
break;
- } else if (start < entry->end) { /* start > entry->start */
- err = chk_conflict(new, entry, new_type);
- if (!err) {
- dprintk("Overlap at 0x%Lx-0x%Lx\n",
- entry->start, entry->end);
- cached_entry = list_entry(entry->nd.prev,
- struct memtype, nd);
-
- /*
- * Move to right position in the linked
- * list to add this new entry
- */
- list_for_each_entry_continue(entry,
- &memtype_list, nd) {
- if (start <= entry->start) {
- where = entry->nd.prev;
- break;
- }
- }
- }
- break;
}
}

\
 
 \ /
  Last update: 2008-10-12 15:47    [W:0.029 / U:8.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site