linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arch: x86: um: tls_32.c:  Remove unused function
@ 2014-12-20 16:12 Rickard Strandqvist
  0 siblings, 0 replies; only message in thread
From: Rickard Strandqvist @ 2014-12-20 16:12 UTC (permalink / raw)
  To: Jeff Dike, Richard Weinberger
  Cc: Rickard Strandqvist, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, x86, user-mode-linux-devel, user-mode-linux-user,
	linux-kernel

Remove the function needs_TLS_update() that is not used anywhere.

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
 arch/x86/um/tls_32.c |   25 -------------------------
 1 file changed, 25 deletions(-)

diff --git a/arch/x86/um/tls_32.c b/arch/x86/um/tls_32.c
index 80ffa5b..587c4a2 100644
--- a/arch/x86/um/tls_32.c
+++ b/arch/x86/um/tls_32.c
@@ -125,31 +125,6 @@ out:
 }
 
 /*
- * Verify if we need to do a flush for the new process, i.e. if there are any
- * present desc's, only if they haven't been flushed.
- */
-static inline int needs_TLS_update(struct task_struct *task)
-{
-	int i;
-	int ret = 0;
-
-	for (i = GDT_ENTRY_TLS_MIN; i < GDT_ENTRY_TLS_MAX; i++) {
-		struct uml_tls_struct* curr =
-			&task->thread.arch.tls_array[i - GDT_ENTRY_TLS_MIN];
-
-		/*
-		 * Can't test curr->present, we may need to clear a descriptor
-		 * which had a value.
-		 */
-		if (curr->flushed)
-			continue;
-		ret = 1;
-		break;
-	}
-	return ret;
-}
-
-/*
  * On a newly forked process, the TLS descriptors haven't yet been flushed. So
  * we mark them as such and the first switch_to will do the job.
  */
-- 
1.7.10.4


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

only message in thread, other threads:[~2014-12-20 16:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-20 16:12 [PATCH] arch: x86: um: tls_32.c: Remove unused function Rickard Strandqvist

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).