summaryrefslogtreecommitdiffhomepage
path: root/pkg/cpuid/cpuid_arm64.go
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2021-01-12 12:36:17 -0800
committergVisor bot <gvisor-bot@google.com>2021-01-12 12:38:22 -0800
commit4e03e87547853523d4ff941935a6ef1712518c61 (patch)
treee930ce0e5f15f7041e7b74daca05acc7afbd2558 /pkg/cpuid/cpuid_arm64.go
parenta20da708291e2e5bdece5176dce61c1b4b10b7d9 (diff)
Fix simple mistakes identified by goreportcard.
These are primarily simplification and lint mistakes. However, minor fixes are also included and tests added where appropriate. PiperOrigin-RevId: 351425971
Diffstat (limited to 'pkg/cpuid/cpuid_arm64.go')
-rw-r--r--pkg/cpuid/cpuid_arm64.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/cpuid/cpuid_arm64.go b/pkg/cpuid/cpuid_arm64.go
index ac7bb6774..98c6ec62f 100644
--- a/pkg/cpuid/cpuid_arm64.go
+++ b/pkg/cpuid/cpuid_arm64.go
@@ -267,7 +267,7 @@ func (fs *FeatureSet) UseXsave() bool {
// FlagsString prints out supported CPU "flags" field in /proc/cpuinfo.
func (fs *FeatureSet) FlagsString() string {
var s []string
- for f, _ := range arm64FeatureStrings {
+ for f := range arm64FeatureStrings {
if fs.Set[f] {
if fstr := f.flagString(); fstr != "" {
s = append(s, fstr)
@@ -296,7 +296,7 @@ func (fs FeatureSet) WriteCPUInfoTo(cpu uint, b *bytes.Buffer) {
func HostFeatureSet() *FeatureSet {
s := make(map[Feature]bool)
- for f, _ := range arm64FeatureStrings {
+ for f := range arm64FeatureStrings {
if hwCap&(1<<f) != 0 {
s[f] = true
}