diff --git a/src/runtime/pkg/device/config/config.go b/src/runtime/pkg/device/config/config.go index c65e861233..32f2251ff6 100644 --- a/src/runtime/pkg/device/config/config.go +++ b/src/runtime/pkg/device/config/config.go @@ -188,7 +188,7 @@ var PCIePortPrefixMapping = map[PCIePort]PCIePortBusPrefix{ BridgePort: PCIBridgePortPrefix, } -func (p PCIePort) InValid() bool { +func (p PCIePort) Invalid() bool { switch p { case RootPort: fallthrough @@ -374,7 +374,7 @@ const ( VFIOAPDeviceMediatedType ) -// VFIOPCIDev represents a VFIO PCI device used for hotplugging +// VFIODev represents a VFIO PCI device used for hotplugging type VFIODev struct { // ID is used to identify this drive in the hypervisor options. ID string diff --git a/src/runtime/pkg/device/drivers/utils.go b/src/runtime/pkg/device/drivers/utils.go index ddb1a0ded3..8c9055ae25 100644 --- a/src/runtime/pkg/device/drivers/utils.go +++ b/src/runtime/pkg/device/drivers/utils.go @@ -47,7 +47,7 @@ func deviceLogger() *logrus.Entry { return api.DeviceLogger() } -// IsPCIeDevice Identifies PCIe device by reading the size of the PCI config space +// IsPCIeDevice identifies PCIe device by reading the size of the PCI config space // Plain PCI device have 256 bytes of config space where PCIe devices have 4K func IsPCIeDevice(bdf string) bool { if len(strings.Split(bdf, ":")) == 2 { diff --git a/src/runtime/pkg/oci/utils.go b/src/runtime/pkg/oci/utils.go index 21e0271603..d782211dd1 100644 --- a/src/runtime/pkg/oci/utils.go +++ b/src/runtime/pkg/oci/utils.go @@ -579,7 +579,7 @@ func addHypervisorPCIePortOverride(value string) (config.PCIePort, error) { return config.NoPort, nil } port := config.PCIePort(value) - if port.InValid() { + if port.Invalid() { return config.InvalidPort, fmt.Errorf("Invalid PCIe port \"%v\" specified in annotation", value) } return port, nil