Skip to content

Commit 62f14bb

Browse files
ying2liuacrnsi
authored andcommitted
DM: remove unused function virtio_dev_error
Change-Id: I6e94ab0286e73435429e2ccf971207c7d8ed6ef6 Tracked-On: #3123 Signed-off-by: Ying Liu <ying2.liu@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
1 parent 2d6e6ca commit 62f14bb

File tree

2 files changed

+0
-37
lines changed

2 files changed

+0
-37
lines changed

devicemodel/hw/pci/virtio/virtio.c

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,30 +1177,6 @@ virtio_set_modern_bar(struct virtio_base *base, bool use_notify_pio)
11771177
return rc;
11781178
}
11791179

1180-
/**
1181-
* @brief Indicate the device has experienced an error.
1182-
*
1183-
* This is called when the device has experienced an error from which it
1184-
* cannot re-cover. DEVICE_NEEDS_RESET is set to the device status register
1185-
* and a config change intr is sent to the guest driver.
1186-
*
1187-
* @param base Pointer to struct virtio_base.
1188-
*
1189-
* @return None
1190-
*/
1191-
void
1192-
virtio_dev_error(struct virtio_base *base)
1193-
{
1194-
if (base->negotiated_caps & (1UL << VIRTIO_F_VERSION_1)) {
1195-
/* see 2.1.2. if DRIVER_OK is set, need to send
1196-
* a device configuration change notification to the driver
1197-
*/
1198-
base->status |= VIRTIO_CONFIG_S_NEEDS_RESET;
1199-
if (base->status & VIRTIO_CONFIG_S_DRIVER_OK)
1200-
virtio_config_changed(base);
1201-
}
1202-
}
1203-
12041180
static struct cap_region {
12051181
uint64_t cap_offset; /* offset of capability region */
12061182
int cap_size; /* size of capability region */

devicemodel/include/virtio.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -716,19 +716,6 @@ uint64_t virtio_pci_read(struct vmctx *ctx, int vcpu, struct pci_vdev *dev,
716716
void virtio_pci_write(struct vmctx *ctx, int vcpu, struct pci_vdev *dev,
717717
int baridx, uint64_t offset, int size, uint64_t value);
718718

719-
/**
720-
* @brief Indicate the device has experienced an error.
721-
*
722-
* This is called when the device has experienced an error from which it
723-
* cannot re-cover. DEVICE_NEEDS_RESET is set to the device status register
724-
* and a config change intr is sent to the guest driver.
725-
*
726-
* @param base Pointer to struct virtio_base.
727-
*
728-
* @return None
729-
*/
730-
void virtio_dev_error(struct virtio_base *base);
731-
732719
/**
733720
* @brief Set modern BAR (usually 4) to map PCI config registers.
734721
*

0 commit comments

Comments
 (0)