From 523aa894a399013574caa58853f3386dc9273cd1 Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Tue, 19 May 2020 15:49:54 +0300 Subject: [PATCH] pkg/cpuid: lint fixes --- pkg/cpuid/cpuid_amd64.go | 8 ++++---- pkg/cpuid/cpuid_amd64.s | 8 +++++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/pkg/cpuid/cpuid_amd64.go b/pkg/cpuid/cpuid_amd64.go index 973d7b19b..7208c5671 100644 --- a/pkg/cpuid/cpuid_amd64.go +++ b/pkg/cpuid/cpuid_amd64.go @@ -16,14 +16,14 @@ limitations under the License. package cpuid -type CpuidRet struct { +type ReturnValue struct { EAX, EBX, ECX, EDX uint32 } -func Cpuid(eax, ecx uint32) *CpuidRet { - r := &CpuidRet{} +func Cpuid(eax, ecx uint32) *ReturnValue { + r := &ReturnValue{} r.EAX, r.EBX, r.ECX, r.EDX = cpuidAsm(eax, ecx) return r } -func cpuidAsm(eax_arg, ecx_arg uint32) (eax, ebx, ecx, edx uint32) +func cpuidAsm(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32) diff --git a/pkg/cpuid/cpuid_amd64.s b/pkg/cpuid/cpuid_amd64.s index 83ac812c1..bda44bdb9 100644 --- a/pkg/cpuid/cpuid_amd64.s +++ b/pkg/cpuid/cpuid_amd64.s @@ -16,9 +16,11 @@ See the License for the specific language governing permissions and limitations under the License. */ -TEXT ·cpuidAsm(SB), 4, $0 // 4 = NOSPLIT - MOVL eax_arg+0(FP), AX - MOVL ecx_arg+4(FP), CX +#include "textflag.h" + +TEXT ·cpuidAsm(SB), NOSPLIT, $0 + MOVL eaxArg+0(FP), AX + MOVL ecxArg+4(FP), CX CPUID MOVL AX, eax+8(FP) MOVL BX, ebx+12(FP)