mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-13 00:29:50 +00:00
mic/host: fix up virtio 1.0 APIs
This just makes code sparse-clean by using new memory access APIs in one file I missed. The new feature bit is not yet negotiated. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
b9f7ac8c72
commit
8a38f339b6
@ -326,21 +326,27 @@ static int mic_vdev_info_show(struct seq_file *s, void *unused)
|
|||||||
}
|
}
|
||||||
avail = vrh->vring.avail;
|
avail = vrh->vring.avail;
|
||||||
seq_printf(s, "avail flags 0x%x idx %d\n",
|
seq_printf(s, "avail flags 0x%x idx %d\n",
|
||||||
avail->flags, avail->idx & (num - 1));
|
vringh16_to_cpu(vrh, avail->flags),
|
||||||
|
vringh16_to_cpu(vrh, avail->idx) & (num - 1));
|
||||||
seq_printf(s, "avail flags 0x%x idx %d\n",
|
seq_printf(s, "avail flags 0x%x idx %d\n",
|
||||||
avail->flags, avail->idx);
|
vringh16_to_cpu(vrh, avail->flags),
|
||||||
|
vringh16_to_cpu(vrh, avail->idx));
|
||||||
for (j = 0; j < num; j++)
|
for (j = 0; j < num; j++)
|
||||||
seq_printf(s, "avail ring[%d] %d\n",
|
seq_printf(s, "avail ring[%d] %d\n",
|
||||||
j, avail->ring[j]);
|
j, avail->ring[j]);
|
||||||
used = vrh->vring.used;
|
used = vrh->vring.used;
|
||||||
seq_printf(s, "used flags 0x%x idx %d\n",
|
seq_printf(s, "used flags 0x%x idx %d\n",
|
||||||
used->flags, used->idx & (num - 1));
|
vringh16_to_cpu(vrh, used->flags),
|
||||||
|
vringh16_to_cpu(vrh, used->idx) & (num - 1));
|
||||||
seq_printf(s, "used flags 0x%x idx %d\n",
|
seq_printf(s, "used flags 0x%x idx %d\n",
|
||||||
used->flags, used->idx);
|
vringh16_to_cpu(vrh, used->flags),
|
||||||
|
vringh16_to_cpu(vrh, used->idx));
|
||||||
for (j = 0; j < num; j++)
|
for (j = 0; j < num; j++)
|
||||||
seq_printf(s, "used ring[%d] id %d len %d\n",
|
seq_printf(s, "used ring[%d] id %d len %d\n",
|
||||||
j, used->ring[j].id,
|
j, vringh32_to_cpu(vrh,
|
||||||
used->ring[j].len);
|
used->ring[j].id),
|
||||||
|
vringh32_to_cpu(vrh,
|
||||||
|
used->ring[j].len));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mutex_unlock(&mdev->mic_mutex);
|
mutex_unlock(&mdev->mic_mutex);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user