Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Jan 2019 19:58:56 +0000 (UTC)
From:      Oleksandr Tymoshenko <gonzo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r343446 - head/sys/mips/mips
Message-ID:  <201901251958.x0PJwuIb085072@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gonzo
Date: Fri Jan 25 19:58:56 2019
New Revision: 343446
URL: https://svnweb.freebsd.org/changeset/base/343446

Log:
  [mips] remove check that is always false (unsinged < 0)
  
  cpuid and local cpu variable are unsigned so checking if value is less than zero
  always yields false.
  
  PR:		211088
  Submitted by:	David Binderman <dcb314@hotmail.com>
  MFC after:	1 week

Modified:
  head/sys/mips/mips/tlb.c

Modified: head/sys/mips/mips/tlb.c
==============================================================================
--- head/sys/mips/mips/tlb.c	Fri Jan 25 19:56:06 2019	(r343445)
+++ head/sys/mips/mips/tlb.c	Fri Jan 25 19:58:56 2019	(r343446)
@@ -348,7 +348,7 @@ DB_SHOW_COMMAND(tlb, ddb_dump_tlb)
 	else
 		cpu = PCPU_GET(cpuid);
 
-	if (cpu < 0 || cpu >= mp_ncpus) {
+	if (cpu >= mp_ncpus) {
 		db_printf("Invalid CPU %u\n", cpu);
 		return;
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901251958.x0PJwuIb085072>