Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x86/x86 fix unused variables



details:   https://anonhg.NetBSD.org/src/rev/1d02a791a8fb
branches:  trunk
changeset: 791194:1d02a791a8fb
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Nov 08 01:41:45 2013 +0000

description:
fix unused variables

diffstat:

 sys/arch/x86/x86/est.c |  11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diffs (46 lines):

diff -r cdf49b6031f2 -r 1d02a791a8fb sys/arch/x86/x86/est.c
--- a/sys/arch/x86/x86/est.c    Fri Nov 08 01:10:23 2013 +0000
+++ b/sys/arch/x86/x86/est.c    Fri Nov 08 01:41:45 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: est.c,v 1.25 2012/06/02 21:36:42 dsl Exp $     */
+/*     $NetBSD: est.c,v 1.26 2013/11/08 01:41:45 christos Exp $        */
 /*
  * Copyright (c) 2003 Michael Eriksson.
  * All rights reserved.
@@ -76,7 +76,7 @@
  *   http://www.codemonkey.org.uk/projects/cpufreq/cpufreq-2.4.22-pre6-1.gz
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: est.c,v 1.25 2012/06/02 21:36:42 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: est.c,v 1.26 2013/11/08 01:41:45 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -1121,7 +1121,6 @@
 #endif
        uint64_t msr;
        uint16_t cur, idhi, idlo;
-       uint8_t crhi, crlo, crcur;
        size_t len;
        int i, mv;
 
@@ -1130,9 +1129,6 @@
        idhi = (msr >> 32) & 0xffff;
        idlo = (msr >> 48) & 0xffff;
        cur = msr & 0xffff;
-       crhi = (idhi  >> 8) & 0xff;
-       crlo = (idlo  >> 8) & 0xff;
-       crcur = (cur >> 8) & 0xff;
 
 #ifdef __i386__
        if (idhi == 0 || idlo == 0 || cur == 0 ||
@@ -1144,6 +1140,9 @@
 #endif
 
 #ifdef __amd64__
+       uint8_t crhi = (idhi >> 8) & 0xff;
+       uint8_t crlo = (idlo >> 8) & 0xff;
+       uint8_t crcur = (cur >> 8) & 0xff;
        if (crlo == 0 || crhi == 0 || crcur == 0 || crhi == crlo ||
            crlo > crhi || crcur < crlo || crcur > crhi) {
                /*



Home | Main Index | Thread Index | Old Index