From owner-svn-src-head@freebsd.org Wed Nov 29 23:52:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18834DED3AE; Wed, 29 Nov 2017 23:52:33 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0F3E69E63; Wed, 29 Nov 2017 23:52:32 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vATNqVCh058852; Wed, 29 Nov 2017 23:52:31 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vATNqVKc058851; Wed, 29 Nov 2017 23:52:31 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201711292352.vATNqVKc058851@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 29 Nov 2017 23:52:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326378 - head/sys/x86/cpufreq X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: head/sys/x86/cpufreq X-SVN-Commit-Revision: 326378 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Nov 2017 23:52:33 -0000 Author: jkim Date: Wed Nov 29 23:52:31 2017 New Revision: 326378 URL: https://svnweb.freebsd.org/changeset/base/326378 Log: Fix style(9). Modified: head/sys/x86/cpufreq/hwpstate.c Modified: head/sys/x86/cpufreq/hwpstate.c ============================================================================== --- head/sys/x86/cpufreq/hwpstate.c Wed Nov 29 23:41:49 2017 (r326377) +++ head/sys/x86/cpufreq/hwpstate.c Wed Nov 29 23:52:31 2017 (r326378) @@ -90,10 +90,10 @@ __FBSDID("$FreeBSD$"); #define AMD_17H_CUR_FID(msr) ((msr) & 0xFF) #define HWPSTATE_DEBUG(dev, msg...) \ - do{ \ - if(hwpstate_verbose) \ + do { \ + if (hwpstate_verbose) \ device_printf(dev, msg); \ - }while(0) + } while (0) struct hwpstate_setting { int freq; /* CPU clock in Mhz or 100ths of a percent. */ @@ -125,7 +125,7 @@ static int hwpstate_goto_pstate(device_t dev, int psta static int hwpstate_verbose = 0; SYSCTL_INT(_debug, OID_AUTO, hwpstate_verbose, CTLFLAG_RWTUN, - &hwpstate_verbose, 0, "Debug hwpstate"); + &hwpstate_verbose, 0, "Debug hwpstate"); static device_method_t hwpstate_methods[] = { /* Device interface */ @@ -169,7 +169,7 @@ hwpstate_goto_pstate(device_t dev, int pstate) int limit; int id = pstate; int error; - + /* get the current pstate limit */ msr = rdmsr(MSR_AMD_10H_11H_LIMIT); limit = AMD_10H_11H_GET_PSTATE_LIMIT(msr); @@ -197,7 +197,7 @@ hwpstate_goto_pstate(device_t dev, int pstate) sched_bind(curthread, i); thread_unlock(curthread); /* wait loop (100*100 usec is enough ?) */ - for (j = 0; j < 100; j++){ + for (j = 0; j < 100; j++) { /* get the result. not assure msr=id */ msr = rdmsr(MSR_AMD_10H_11H_STATUS); if (msr == id) @@ -250,7 +250,7 @@ hwpstate_get(device_t dev, struct cf_setting *cf) if (cf == NULL) return (EINVAL); msr = rdmsr(MSR_AMD_10H_11H_STATUS); - if(msr >= sc->cfnum) + if (msr >= sc->cfnum) return (EINVAL); set = sc->hwpstate_settings[msr]; @@ -425,7 +425,7 @@ hwpstate_get_info_from_msr(device_t dev) fid = AMD_10H_11H_CUR_FID(msr); /* Convert fid/did to frequency. */ - switch(family) { + switch (family) { case 0x11: hwpstate_set[i].freq = (100 * (fid + 0x08)) >> did; break;