Skip to content

Commit

Permalink
virtio: Remove never used virtio_feature_name()
Browse files Browse the repository at this point in the history
The comments states this was kept for "future use", that was a decade
ago.. Remove this never used function and associated data.

Signed-off-by: Andrew Davis <afd@ti.com>
  • Loading branch information
glneo authored and arnopo committed May 13, 2024
1 parent 94b2125 commit 2e5026f
Showing 1 changed file with 1 addition and 34 deletions.
35 changes: 1 addition & 34 deletions lib/virtio/virtio.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,6 @@ static const struct virtio_ident {
0, NULL}
};

/* Device independent features. */
static const struct virtio_feature_desc virtio_common_feature_desc[] = {
{VIRTIO_F_NOTIFY_ON_EMPTY, "NotifyOnEmpty"},
{VIRTIO_RING_F_INDIRECT_DESC, "RingIndirect"},
{VIRTIO_RING_F_EVENT_IDX, "EventIdx"},
{VIRTIO_F_BAD_FEATURE, "BadFeature"},

{0, NULL}
};

const char *virtio_dev_name(unsigned short devid)
{
const struct virtio_ident *ident;
Expand All @@ -60,36 +50,13 @@ const char *virtio_dev_name(unsigned short devid)
return NULL;
}

static const char *virtio_feature_name(unsigned long val,
const struct virtio_feature_desc *desc)
{
int i, j;
const struct virtio_feature_desc *descs[2] = { desc,
virtio_common_feature_desc
};

for (i = 0; i < 2; i++) {
if (!descs[i])
continue;

for (j = 0; descs[i][j].vfd_val != 0; j++) {
if (val == descs[i][j].vfd_val)
return descs[i][j].vfd_str;
}
}

return NULL;
}

__deprecated void virtio_describe(struct virtio_device *dev, const char *msg,
uint32_t features, struct virtio_feature_desc *desc)
{
(void)dev;
(void)msg;
(void)features;

/* TODO: Not used currently - keeping it for future use*/
virtio_feature_name(0, desc);
(void)desc;
}

int virtio_create_virtqueues(struct virtio_device *vdev, unsigned int flags,
Expand Down

0 comments on commit 2e5026f

Please sign in to comment.