[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190212021215.13247-3-richardw.yang@linux.intel.com>
Date: Tue, 12 Feb 2019 10:12:11 +0800
From: Wei Yang <richardw.yang@...ux.intel.com>
To: x86@...nel.org, linux-kernel@...r.kernel.org
Cc: dave.hansen@...ux.intel.com, luto@...nel.org, peterz@...radead.or,
tglx@...utronix.de, Wei Yang <richardw.yang@...ux.intel.com>
Subject: [PATCH 2/6] x86, mm: remove check in save_mr
This check has been validated before calling save_mr. It is not
necessary to do this again.
Signed-off-by: Wei Yang <richardw.yang@...ux.intel.com>
---
arch/x86/mm/init.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
index 1b980b70911a..6fb84be79c7c 100644
--- a/arch/x86/mm/init.c
+++ b/arch/x86/mm/init.c
@@ -259,14 +259,12 @@ static int __meminit save_mr(struct map_range *mr, int nr_range,
unsigned long start_pfn, unsigned long end_pfn,
unsigned long page_size_mask)
{
- if (start_pfn < end_pfn) {
- if (nr_range >= NR_RANGE_MR)
- panic("run out of range for init_memory_mapping\n");
- mr[nr_range].start = start_pfn<<PAGE_SHIFT;
- mr[nr_range].end = end_pfn<<PAGE_SHIFT;
- mr[nr_range].page_size_mask = page_size_mask;
- nr_range++;
- }
+ if (nr_range >= NR_RANGE_MR)
+ panic("run out of range for init_memory_mapping\n");
+ mr[nr_range].start = start_pfn<<PAGE_SHIFT;
+ mr[nr_range].end = end_pfn<<PAGE_SHIFT;
+ mr[nr_range].page_size_mask = page_size_mask;
+ nr_range++;
return nr_range;
}
--
2.19.1
Powered by blists - more mailing lists