mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "bibo mao" <bibo.mao@gmail.com>
To: akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org
Subject: [patch 0/1]pat: remove redundant condition check
Date: Sun, 12 Oct 2008 21:45:12 +0800	[thread overview]
Message-ID: <fbd277f20810120645g7feb4b85g49211641829e153e@mail.gmail.com> (raw)

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;
 		}
 	}

             reply	other threads:[~2008-10-12 13:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-12 13:45 bibo mao [this message]
2008-10-13 18:49 ` Pallipadi, Venkatesh

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=fbd277f20810120645g7feb4b85g49211641829e153e@mail.gmail.com \
    --to=bibo.mao@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®