The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] [x86] overlap: cleanup redundant logic
@ 2020-06-22  1:48 Gaurav Singh
  0 siblings, 0 replies; only message in thread
From: Gaurav Singh @ 2020-06-22  1:48 UTC (permalink / raw)
  To: gaurav1086, Dave Hansen, Andy Lutomirski, Peter Zijlstra,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov,
	maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT), H. Peter Anvin,
	Logan Gunthorpe, Benjamin Thiel, open list:X86 MM

In overlap check, same expression is repeated twice.
Remove one of them.

Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
---
 arch/x86/mm/pat/set_memory.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/x86/mm/pat/set_memory.c b/arch/x86/mm/pat/set_memory.c
index 77e04304a2a7..7d44b4863ee5 100644
--- a/arch/x86/mm/pat/set_memory.c
+++ b/arch/x86/mm/pat/set_memory.c
@@ -388,8 +388,7 @@ static void cpa_flush(struct cpa_data *data, int cache)
 static bool overlaps(unsigned long r1_start, unsigned long r1_end,
 		     unsigned long r2_start, unsigned long r2_end)
 {
-	return (r1_start <= r2_end && r1_end >= r2_start) ||
-		(r2_start <= r1_end && r2_end >= r1_start);
+	return (r1_start <= r2_end && r1_end >= r2_start);
 }
 
 #ifdef CONFIG_PCI_BIOS
-- 
2.17.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-06-22  1:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-22  1:48 [PATCH] [x86] overlap: cleanup redundant logic Gaurav Singh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox