Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

virtio: Remove never used virtio_feature_name() #584

Merged
merged 1 commit into from
May 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading