svn commit: r261896 - head/sys/vm

Dimitry Andric dim at FreeBSD.org
Fri Feb 14 17:47:19 UTC 2014


Author: dim
Date: Fri Feb 14 17:47:18 2014
New Revision: 261896
URL: http://svnweb.freebsd.org/changeset/base/261896

Log:
  After r251709, avoid a clang 3.4 warning about an unused static const
  variable (uma_max_ipers), when asserts are disabled.
  
  Reviewed by:	glebius
  MFC after:	3 days

Modified:
  head/sys/vm/uma_core.c

Modified: head/sys/vm/uma_core.c
==============================================================================
--- head/sys/vm/uma_core.c	Fri Feb 14 15:46:06 2014	(r261895)
+++ head/sys/vm/uma_core.c	Fri Feb 14 17:47:18 2014	(r261896)
@@ -150,9 +150,6 @@ static int booted = 0;
 #define	UMA_STARTUP	1
 #define	UMA_STARTUP2	2
 
-/* Maximum number of allowed items-per-slab if the slab header is OFFPAGE */
-static const u_int uma_max_ipers = SLAB_SETSIZE;
-
 /*
  * Only mbuf clusters use ref zones.  Just provide enough references
  * to support the one user.  New code should not use the ref facility.
@@ -1389,7 +1386,7 @@ keg_cachespread_init(uma_keg_t keg)
 	keg->uk_slabsize = UMA_SLAB_SIZE;
 	keg->uk_ipers = ((pages * PAGE_SIZE) + trailer) / rsize;
 	keg->uk_flags |= UMA_ZONE_OFFPAGE | UMA_ZONE_VTOSLAB;
-	KASSERT(keg->uk_ipers <= uma_max_ipers,
+	KASSERT(keg->uk_ipers <= SLAB_SETSIZE,
 	    ("%s: keg->uk_ipers too high(%d) increase max_ipers", __func__,
 	    keg->uk_ipers));
 }


More information about the svn-src-all mailing list