gpu: Fixing typos for PCIe topology changes

Some comments and functions had typos and wrong capitalization.

Signed-off-by: Zvonko Kaiser <zkaiser@nvidia.com>
This commit is contained in:
Zvonko Kaiser 2023-06-30 08:42:55 +00:00
parent 8330fb8ee7
commit 0f454d0c04
3 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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 {

View File

@ -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