From owner-svn-src-all@FreeBSD.ORG Tue Jan 17 22:09:33 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8AA051065787; Tue, 17 Jan 2012 22:09:33 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F7568FC17; Tue, 17 Jan 2012 22:09:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0HM9XTV009662; Tue, 17 Jan 2012 22:09:33 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0HM9X3u009658; Tue, 17 Jan 2012 22:09:33 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201201172209.q0HM9X3u009658@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 17 Jan 2012 22:09:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r230285 - in stable/7/sys: amd64/amd64 i386/i386 pc98/pc98 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jan 2012 22:09:33 -0000 Author: bz Date: Tue Jan 17 22:09:33 2012 New Revision: 230285 URL: http://svn.freebsd.org/changeset/base/230285 Log: MFC r225048: In this branch when doing no further checkes there is no reason use the temporary variable and check with if as TUNABLE_*_FETCH do not alter values unless successfully found the tunable. Modified: stable/7/sys/amd64/amd64/machdep.c stable/7/sys/i386/i386/machdep.c stable/7/sys/pc98/pc98/machdep.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/amd64/amd64/machdep.c ============================================================================== --- stable/7/sys/amd64/amd64/machdep.c Tue Jan 17 22:08:58 2012 (r230284) +++ stable/7/sys/amd64/amd64/machdep.c Tue Jan 17 22:09:33 2012 (r230285) @@ -956,7 +956,7 @@ getmemsize(caddr_t kmdp, u_int64_t first { int i, off, physmap_idx, pa_indx, da_indx; vm_paddr_t pa, physmap[PHYSMAP_SIZE]; - u_long physmem_tunable, memtest, tmpul; + u_long physmem_tunable, memtest; pt_entry_t *pte; struct bios_smap *smapbase, *smap, *smapend; u_int32_t smapsize; @@ -1023,8 +1023,7 @@ getmemsize(caddr_t kmdp, u_int64_t first * one could eventually do more with the code than just disable it. */ memtest = 1; - if (TUNABLE_ULONG_FETCH("hw.memtest.tests", &tmpul)) - memtest = tmpul; + TUNABLE_ULONG_FETCH("hw.memtest.tests", &memtest); /* * Don't allow MAXMEM or hw.physmem to extend the amount of memory Modified: stable/7/sys/i386/i386/machdep.c ============================================================================== --- stable/7/sys/i386/i386/machdep.c Tue Jan 17 22:08:58 2012 (r230284) +++ stable/7/sys/i386/i386/machdep.c Tue Jan 17 22:09:33 2012 (r230285) @@ -1809,7 +1809,7 @@ static void getmemsize(int first) { int has_smap, off, physmap_idx, pa_indx, da_indx; - u_long physmem_tunable, memtest, tmpul; + u_long physmem_tunable, memtest; vm_paddr_t physmap[PHYSMAP_SIZE]; pt_entry_t *pte; quad_t dcons_addr, dcons_size; @@ -2010,8 +2010,7 @@ physmap_done: * one could eventually do more with the code than just disable it. */ memtest = 1; - if (TUNABLE_ULONG_FETCH("hw.memtest.tests", &tmpul)) - memtest = tmpul; + TUNABLE_ULONG_FETCH("hw.memtest.tests", &memtest); if (atop(physmap[physmap_idx + 1]) != Maxmem && (boothowto & RB_VERBOSE)) Modified: stable/7/sys/pc98/pc98/machdep.c ============================================================================== --- stable/7/sys/pc98/pc98/machdep.c Tue Jan 17 22:08:58 2012 (r230284) +++ stable/7/sys/pc98/pc98/machdep.c Tue Jan 17 22:09:33 2012 (r230285) @@ -1697,7 +1697,7 @@ static void getmemsize(int first) { int off, physmap_idx, pa_indx, da_indx; - u_long physmem_tunable, memtest, tmpul; + u_long physmem_tunable, memtest; vm_paddr_t physmap[PHYSMAP_SIZE]; pt_entry_t *pte; quad_t dcons_addr, dcons_size; @@ -1762,8 +1762,7 @@ getmemsize(int first) * one could eventually do more with the code than just disable it. */ memtest = 1; - if (TUNABLE_ULONG_FETCH("hw.memtest.tests", &tmpul)) - memtest = tmpul; + TUNABLE_ULONG_FETCH("hw.memtest.tests", &memtest); if (atop(physmap[physmap_idx + 1]) != Maxmem && (boothowto & RB_VERBOSE))