From owner-svn-src-head@freebsd.org Sun Mar 19 21:24:09 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 07371D13067; Sun, 19 Mar 2017 21:24:09 +0000 (UTC) (envelope-from kib@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 AEA2413E4; Sun, 19 Mar 2017 21:24:08 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2JLO7LG038579; Sun, 19 Mar 2017 21:24:07 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2JLO7Id038578; Sun, 19 Mar 2017 21:24:07 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201703192124.v2JLO7Id038578@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 19 Mar 2017 21:24:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315586 - head/sys/dev/cpuctl X-SVN-Group: head 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.23 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: Sun, 19 Mar 2017 21:24:09 -0000 Author: kib Date: Sun Mar 19 21:24:07 2017 New Revision: 315586 URL: https://svnweb.freebsd.org/changeset/base/315586 Log: Style. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/dev/cpuctl/cpuctl.c Modified: head/sys/dev/cpuctl/cpuctl.c ============================================================================== --- head/sys/dev/cpuctl/cpuctl.c Sun Mar 19 21:18:53 2017 (r315585) +++ head/sys/dev/cpuctl/cpuctl.c Sun Mar 19 21:24:07 2017 (r315586) @@ -126,7 +126,8 @@ set_cpu(int cpu, struct thread *td) sched_bind(td, cpu); thread_unlock(td); KASSERT(td->td_oncpu == cpu, - ("[cpuctl,%d]: cannot bind to target cpu %d on cpu %d", __LINE__, cpu, td->td_oncpu)); + ("[cpuctl,%d]: cannot bind to target cpu %d on cpu %d", __LINE__, + cpu, td->td_oncpu)); } static void @@ -145,11 +146,11 @@ restore_cpu(int oldcpu, int is_bound, st int cpuctl_ioctl(struct cdev *dev, u_long cmd, caddr_t data, - int flags, struct thread *td) + int flags, struct thread *td) { - int ret; - int cpu = dev2unit(dev); + int cpu, ret; + cpu = dev2unit(dev); if (cpu > mp_maxid || !cpu_enabled(cpu)) { DPRINTF("[cpuctl,%d]: bad cpu number %d\n", __LINE__, cpu); return (ENXIO); @@ -279,7 +280,8 @@ cpuctl_do_msr(int cpu, cpuctl_msr_args_t ret = wrmsr_safe(data->msr, reg & ~data->data); critical_exit(); } else - panic("[cpuctl,%d]: unknown operation requested: %lu", __LINE__, cmd); + panic("[cpuctl,%d]: unknown operation requested: %lu", + __LINE__, cmd); restore_cpu(oldcpu, is_bound, td); return (ret); } @@ -311,7 +313,8 @@ cpuctl_do_update(int cpu, cpuctl_update_ ret = update_intel(cpu, data, td); else if(strncmp(vendor, AMD_VENDOR_ID, sizeof(AMD_VENDOR_ID)) == 0) ret = update_amd(cpu, data, td); - else if(strncmp(vendor, CENTAUR_VENDOR_ID, sizeof(CENTAUR_VENDOR_ID)) == 0) + else if(strncmp(vendor, CENTAUR_VENDOR_ID, sizeof(CENTAUR_VENDOR_ID)) + == 0) ret = update_via(cpu, data, td); else ret = ENXIO;