Skip to content

Commit 569c392

Browse files
Dr. David Alan Gilbertmstsirkin
authored andcommitted
vhost: vringh: Remove unused iotlb functions
The functions: vringh_abandon_iotlb() vringh_notify_disable_iotlb() and vringh_notify_enable_iotlb() were added in 2020 by commit 9ad9c49 ("vringh: IOTLB support") but have remained unused. Remove them. Signed-off-by: Dr. David Alan Gilbert <[email protected]> Reviewed-by: Simon Horman <[email protected]> Message-Id: <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]> Acked-by: Eugenio Pérez <[email protected]> Tested-by: Lei Yang <[email protected]>
1 parent 69cd720 commit 569c392

File tree

2 files changed

+0
-48
lines changed

2 files changed

+0
-48
lines changed

drivers/vhost/vringh.c

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,23 +1534,6 @@ ssize_t vringh_iov_push_iotlb(struct vringh *vrh,
15341534
}
15351535
EXPORT_SYMBOL(vringh_iov_push_iotlb);
15361536

1537-
/**
1538-
* vringh_abandon_iotlb - we've decided not to handle the descriptor(s).
1539-
* @vrh: the vring.
1540-
* @num: the number of descriptors to put back (ie. num
1541-
* vringh_get_iotlb() to undo).
1542-
*
1543-
* The next vringh_get_iotlb() will return the old descriptor(s) again.
1544-
*/
1545-
void vringh_abandon_iotlb(struct vringh *vrh, unsigned int num)
1546-
{
1547-
/* We only update vring_avail_event(vr) when we want to be notified,
1548-
* so we haven't changed that yet.
1549-
*/
1550-
vrh->last_avail_idx -= num;
1551-
}
1552-
EXPORT_SYMBOL(vringh_abandon_iotlb);
1553-
15541537
/**
15551538
* vringh_complete_iotlb - we've finished with descriptor, publish it.
15561539
* @vrh: the vring.
@@ -1571,32 +1554,6 @@ int vringh_complete_iotlb(struct vringh *vrh, u16 head, u32 len)
15711554
}
15721555
EXPORT_SYMBOL(vringh_complete_iotlb);
15731556

1574-
/**
1575-
* vringh_notify_enable_iotlb - we want to know if something changes.
1576-
* @vrh: the vring.
1577-
*
1578-
* This always enables notifications, but returns false if there are
1579-
* now more buffers available in the vring.
1580-
*/
1581-
bool vringh_notify_enable_iotlb(struct vringh *vrh)
1582-
{
1583-
return __vringh_notify_enable(vrh, getu16_iotlb, putu16_iotlb);
1584-
}
1585-
EXPORT_SYMBOL(vringh_notify_enable_iotlb);
1586-
1587-
/**
1588-
* vringh_notify_disable_iotlb - don't tell us if something changes.
1589-
* @vrh: the vring.
1590-
*
1591-
* This is our normal running state: we disable and then only enable when
1592-
* we're going to sleep.
1593-
*/
1594-
void vringh_notify_disable_iotlb(struct vringh *vrh)
1595-
{
1596-
__vringh_notify_disable(vrh, putu16_iotlb);
1597-
}
1598-
EXPORT_SYMBOL(vringh_notify_disable_iotlb);
1599-
16001557
/**
16011558
* vringh_need_notify_iotlb - must we tell the other side about used buffers?
16021559
* @vrh: the vring we've called vringh_complete_iotlb() on.

include/linux/vringh.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -319,13 +319,8 @@ ssize_t vringh_iov_push_iotlb(struct vringh *vrh,
319319
struct vringh_kiov *wiov,
320320
const void *src, size_t len);
321321

322-
void vringh_abandon_iotlb(struct vringh *vrh, unsigned int num);
323-
324322
int vringh_complete_iotlb(struct vringh *vrh, u16 head, u32 len);
325323

326-
bool vringh_notify_enable_iotlb(struct vringh *vrh);
327-
void vringh_notify_disable_iotlb(struct vringh *vrh);
328-
329324
int vringh_need_notify_iotlb(struct vringh *vrh);
330325

331326
#endif /* CONFIG_VHOST_IOTLB */

0 commit comments

Comments
 (0)