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 Add 'break', otherwise we're not gonna go v...



details:   https://anonhg.NetBSD.org/src/rev/767e2bcf3a52
branches:  trunk
changeset: 831395:767e2bcf3a52
user:      maxv <maxv%NetBSD.org@localhost>
date:      Wed Mar 28 19:47:54 2018 +0000

description:
Add 'break', otherwise we're not gonna go very far. While here use a less
error-prone syntax.

diffstat:

 sys/arch/x86/x86/cpu_ucode.c |  12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diffs (34 lines):

diff -r 2d28504c75ff -r 767e2bcf3a52 sys/arch/x86/x86/cpu_ucode.c
--- a/sys/arch/x86/x86/cpu_ucode.c      Wed Mar 28 19:30:41 2018 +0000
+++ b/sys/arch/x86/x86/cpu_ucode.c      Wed Mar 28 19:47:54 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_ucode.c,v 1.8 2018/03/18 00:17:18 christos Exp $ */
+/* $NetBSD: cpu_ucode.c,v 1.9 2018/03/28 19:47:54 maxv Exp $ */
 /*
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu_ucode.c,v 1.8 2018/03/18 00:17:18 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_ucode.c,v 1.9 2018/03/28 19:47:54 maxv Exp $");
 
 #include "opt_cpu_ucode.h"
 #include "opt_xen.h"
@@ -67,9 +67,13 @@
 
        switch (cpu_vendor) {
        case CPUVENDOR_AMD:
-               error = cpu_ucode_amd_get_version(data, &v, l = sizeof(v.a));
+               l = sizeof(v.a);
+               error = cpu_ucode_amd_get_version(data, &v, l);
+               break;
        case CPUVENDOR_INTEL:
-               error = cpu_ucode_intel_get_version(data, &v, l = sizeof(v.i));
+               l = sizeof(v.i);
+               error = cpu_ucode_intel_get_version(data, &v, l);
+               break;
        default:
                return EOPNOTSUPP;
        }



Home | Main Index | Thread Index | Old Index