Skip to contentSkip to conversation

sparc64: remove unused function straddles_64bit_va_hole()

PATCH In review Kirill Tkhai 2 participants 3 messages Jul 9, 2012 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sparc64: remove unused function straddles_64bit_va_hole()

Nobody uses straddles_64bit_va_hole(). Remove it

---
arch/sparc/kernel/sys_sparc_64.c | 17 -----------------

 1 files changed, 0 insertions(+), 17 deletions(-)
arch/sparc/kernel/sys_sparc_64.c +0 -17
index 3ee51f1..a47c262 100644
@@ -66,23 +66,6 @@ static inline int invalid_64bit_range(unsigned long addr, unsigned long len)
 	return 0;
 }
 
-/* Does start,end straddle the VA-space hole?  */
-static inline int straddles_64bit_va_hole(unsigned long start, unsigned long end)
-{
-	unsigned long va_exclude_start, va_exclude_end;
-
-	va_exclude_start = VA_EXCLUDE_START;
-	va_exclude_end   = VA_EXCLUDE_END;
-
-	if (likely(start < va_exclude_start && end < va_exclude_start))
-		return 0;
-
-	if (likely(start >= va_exclude_end && end >= va_exclude_end))
-		return 0;
-
-	return 1;
-}
-
 /* These functions differ from the default implementations in
  * mm/mmap.c in two ways:
  *
maintainer
#1 lore raw

From: Kirill Tkhai <[email protected]>
Date: Mon, 09 Jul 2012 18:22:11 +0400

Quoted 3 lines

Nobody uses straddles_64bit_va_hole(). Remove it

Well, that's a bug, because we have to keep applications from being to mmap() things into this virtual address range.

I'll look into the GIT history to see how it has erroneously become unused.

maintainer
#2 lore raw
In reply to Kirill Tkhai

From: David Miller <[email protected]>
Date: Mon, 09 Jul 2012 14:15:51 -0700 (PDT)

Quoted 5 lines

From: Kirill Tkhai <[email protected]>
Date: Mon, 09 Jul 2012 18:22:11 +0400

Quoted 2 lines

Nobody uses straddles_64bit_va_hole(). Remove it

Quoted 7 lines
Quoted 1 line

Well, that's a bug, because we have to keep applications from being to mmap() things into this virtual address range.

I'll look into the GIT history to see how it has erroneously become unused.

Ok, I see what happened.

When Al viro removed sparc_brk() from this file, it removed the last user. And legitimately so.

I'll therefore apply your patch, thanks.