Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
devices: remove unused functions
Browse files Browse the repository at this point in the history
cleanup: remove ununsed device interface function "GetDeviceInfo()"

Signed-off-by: Zhang Wei <[email protected]>
  • Loading branch information
WeiZhang555 committed Jul 31, 2018
1 parent a93e2d0 commit 7d9d66d
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 32 deletions.
2 changes: 0 additions & 2 deletions virtcontainers/device/api/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ type Device interface {
// DeviceType indicates which kind of device it is
// e.g. block, vfio or vhost user
DeviceType() config.DeviceType
// GetDeviceInfo returns device information that the device is created based on
GetDeviceInfo() *config.DeviceInfo
// GetDeviceDrive returns device specific data used for hotplugging by hypervisor
// Caller could cast the return value to device specific struct
// e.g. Block device returns *config.BlockDrive and
Expand Down
5 changes: 0 additions & 5 deletions virtcontainers/device/drivers/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,6 @@ func (device *BlockDevice) DeviceID() string {
return device.ID
}

// GetDeviceInfo returns device information that the device is created based on
func (device *BlockDevice) GetDeviceInfo() *config.DeviceInfo {
return device.DeviceInfo
}

// GetDeviceDrive returns device information used for creating
func (device *BlockDevice) GetDeviceDrive() interface{} {
return device.BlockDrive
Expand Down
5 changes: 0 additions & 5 deletions virtcontainers/device/drivers/generic.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ func (device *GenericDevice) DeviceType() config.DeviceType {
return config.DeviceGeneric
}

// GetDeviceInfo returns device information that the device is created based on
func (device *GenericDevice) GetDeviceInfo() *config.DeviceInfo {
return device.DeviceInfo
}

// GetDeviceDrive returns device information used for creating
func (device *GenericDevice) GetDeviceDrive() interface{} {
return device.DeviceInfo
Expand Down
5 changes: 0 additions & 5 deletions virtcontainers/device/drivers/vfio.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,6 @@ func (device *VFIODevice) DeviceID() string {
return device.ID
}

// GetDeviceInfo returns device information that the device is created based on
func (device *VFIODevice) GetDeviceInfo() *config.DeviceInfo {
return device.DeviceInfo
}

// GetDeviceDrive returns device information used for creating
func (device *VFIODevice) GetDeviceDrive() interface{} {
return device.vfioDrives
Expand Down
5 changes: 0 additions & 5 deletions virtcontainers/device/drivers/vhost_user_blk.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@ func (device *VhostUserBlkDevice) DeviceType() config.DeviceType {
return config.VhostUserBlk
}

// GetDeviceInfo returns device information that the device is created based on
func (device *VhostUserBlkDevice) GetDeviceInfo() *config.DeviceInfo {
return device.DeviceInfo
}

// GetDeviceDrive returns device information used for creating
func (device *VhostUserBlkDevice) GetDeviceDrive() interface{} {
device.Type = device.DeviceType()
Expand Down
5 changes: 0 additions & 5 deletions virtcontainers/device/drivers/vhost_user_net.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@ func (device *VhostUserNetDevice) DeviceType() config.DeviceType {
return config.VhostUserNet
}

// GetDeviceInfo returns device information that the device is created based on
func (device *VhostUserNetDevice) GetDeviceInfo() *config.DeviceInfo {
return device.DeviceInfo
}

// GetDeviceDrive returns device information used for creating
func (device *VhostUserNetDevice) GetDeviceDrive() interface{} {
device.Type = device.DeviceType()
Expand Down
5 changes: 0 additions & 5 deletions virtcontainers/device/drivers/vhost_user_scsi.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@ func (device *VhostUserSCSIDevice) DeviceType() config.DeviceType {
return config.VhostUserSCSI
}

// GetDeviceInfo returns device information that the device is created based on
func (device *VhostUserSCSIDevice) GetDeviceInfo() *config.DeviceInfo {
return device.DeviceInfo
}

// GetDeviceDrive returns device information used for creating
func (device *VhostUserSCSIDevice) GetDeviceDrive() interface{} {
device.Type = device.DeviceType()
Expand Down

0 comments on commit 7d9d66d

Please sign in to comment.