diff --git a/cli/kata-check.go b/cli/kata-check.go index d47328867c..a97469f21a 100644 --- a/cli/kata-check.go +++ b/cli/kata-check.go @@ -52,9 +52,9 @@ const ( kernelPropertyCorrect = "Kernel property value correct" // these refer to fields in the procCPUINFO file - genericCPUFlagsTag = "flags" - genericCPUVendorField = "vendor_id" - genericCPUModelField = "model name" + genericCPUFlagsTag = "flags" // nolint: varcheck,unused + genericCPUVendorField = "vendor_id" // nolint: varcheck,unused + genericCPUModelField = "model name" // nolint: varcheck,unused ) // variables rather than consts to allow tests to modify them diff --git a/cli/kata-check_test.go b/cli/kata-check_test.go index 5442bfbe48..b8536bcb2e 100644 --- a/cli/kata-check_test.go +++ b/cli/kata-check_test.go @@ -138,6 +138,7 @@ func makeCPUInfoFile(path, vendorID, flags string) error { return ioutil.WriteFile(path, contents.Bytes(), testFileMode) } +// nolint: unused func genericTestGetCPUDetails(t *testing.T, validVendor string, validModel string, validContents string, data []TestData) { tmpdir, err := ioutil.TempDir("", "") if err != nil { diff --git a/cli/kata-env_test.go b/cli/kata-env_test.go index a3b6a5970a..4efdf51c65 100644 --- a/cli/kata-env_test.go +++ b/cli/kata-env_test.go @@ -244,6 +244,7 @@ func getExpectedAgentDetails(config oci.RuntimeConfig) (AgentInfo, error) { }, nil } +// nolint: unused func genericGetExpectedHostDetails(tmpdir string, expectedVendor string, expectedModel string) (HostInfo, error) { type filesToCreate struct { file string diff --git a/virtcontainers/qemu.go b/virtcontainers/qemu.go index 487f91ba67..581ce2eb67 100644 --- a/virtcontainers/qemu.go +++ b/virtcontainers/qemu.go @@ -1406,6 +1406,7 @@ func (q *qemu) resizeMemory(reqMemMB uint32, memoryBlockSizeMB uint32) (uint32, } // genericAppendBridges appends to devices the given bridges +// nolint: unused func genericAppendBridges(devices []govmmQemu.Device, bridges []types.PCIBridge, machineType string) []govmmQemu.Device { bus := defaultPCBridgeBus switch machineType { @@ -1437,6 +1438,7 @@ func genericAppendBridges(devices []govmmQemu.Device, bridges []types.PCIBridge, return devices } +// nolint: unused func genericBridges(number uint32, machineType string) []types.PCIBridge { var bridges []types.PCIBridge var bt types.PCIType @@ -1469,6 +1471,7 @@ func genericBridges(number uint32, machineType string) []types.PCIBridge { return bridges } +// nolint: unused func genericMemoryTopology(memoryMb, hostMemoryMb uint64, slots uint8, memoryOffset uint32) govmmQemu.Memory { // image NVDIMM device needs memory space 1024MB // See https://github.com/clearcontainers/runtime/issues/380 diff --git a/virtcontainers/qemu_arm64.go b/virtcontainers/qemu_arm64.go index bc72b0fa79..cd383de33f 100644 --- a/virtcontainers/qemu_arm64.go +++ b/virtcontainers/qemu_arm64.go @@ -26,7 +26,7 @@ const defaultQemuMachineType = QemuVirt var defaultQemuMachineOptions = "usb=off,accel=kvm,gic-version=" + getGuestGICVersion() // Not used -const defaultPCBridgeBus = "" +const defaultPCBridgeBus = "" // nolint: unused var qemuPaths = map[string]string{ QemuVirt: defaultQemuPath,