From daf5abce2d4a3063da694f37416a91e9678ce4d2 Mon Sep 17 00:00:00 2001 From: Zhang Wei Date: Thu, 5 Jul 2018 16:47:38 +0800 Subject: [PATCH] devices: remove unused functions cleanup: remove ununsed device interface function "GetDeviceInfo()" Signed-off-by: Zhang Wei --- virtcontainers/device/api/interface.go | 2 -- virtcontainers/device/drivers/block.go | 5 ----- virtcontainers/device/drivers/generic.go | 5 ----- virtcontainers/device/drivers/vfio.go | 5 ----- virtcontainers/device/drivers/vhost_user_blk.go | 5 ----- virtcontainers/device/drivers/vhost_user_net.go | 5 ----- virtcontainers/device/drivers/vhost_user_scsi.go | 5 ----- 7 files changed, 32 deletions(-) diff --git a/virtcontainers/device/api/interface.go b/virtcontainers/device/api/interface.go index eb9ce6b6a..6d67d0360 100644 --- a/virtcontainers/device/api/interface.go +++ b/virtcontainers/device/api/interface.go @@ -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 diff --git a/virtcontainers/device/drivers/block.go b/virtcontainers/device/drivers/block.go index da41cf2ec..518425f1e 100644 --- a/virtcontainers/device/drivers/block.go +++ b/virtcontainers/device/drivers/block.go @@ -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 diff --git a/virtcontainers/device/drivers/generic.go b/virtcontainers/device/drivers/generic.go index e339af210..ccb43f34b 100644 --- a/virtcontainers/device/drivers/generic.go +++ b/virtcontainers/device/drivers/generic.go @@ -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 diff --git a/virtcontainers/device/drivers/vfio.go b/virtcontainers/device/drivers/vfio.go index 313411ab1..e47e940bb 100644 --- a/virtcontainers/device/drivers/vfio.go +++ b/virtcontainers/device/drivers/vfio.go @@ -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 diff --git a/virtcontainers/device/drivers/vhost_user_blk.go b/virtcontainers/device/drivers/vhost_user_blk.go index dc4b4db1b..ea1a22530 100644 --- a/virtcontainers/device/drivers/vhost_user_blk.go +++ b/virtcontainers/device/drivers/vhost_user_blk.go @@ -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() diff --git a/virtcontainers/device/drivers/vhost_user_net.go b/virtcontainers/device/drivers/vhost_user_net.go index dd3bd53d9..663e72a21 100644 --- a/virtcontainers/device/drivers/vhost_user_net.go +++ b/virtcontainers/device/drivers/vhost_user_net.go @@ -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() diff --git a/virtcontainers/device/drivers/vhost_user_scsi.go b/virtcontainers/device/drivers/vhost_user_scsi.go index ec273f39d..98bac82d5 100644 --- a/virtcontainers/device/drivers/vhost_user_scsi.go +++ b/virtcontainers/device/drivers/vhost_user_scsi.go @@ -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()