]> git.karo-electronics.de Git - karo-tx-linux.git/commit
virtio: Fix typecast of pointer in vring_init()
authorThomas Huth <thuth@redhat.com>
Thu, 2 Jul 2015 07:21:22 +0000 (09:21 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 7 Jul 2015 11:27:04 +0000 (14:27 +0300)
commitd768f32aec8c0ebb8499ffca89cfed8f5f1a4432
tree3518c844a175fa03ec7cc9d6c0d1012d2dd3eadb
parent908a5544cd29ed60114ed60bded6dbe8cdd56326
virtio: Fix typecast of pointer in vring_init()

The virtio_ring.h header is used in userspace programs (ie. QEMU),
too. Here we can not assume that sizeof(pointer) is the same as
sizeof(long), e.g. when compiling for Windows, so the typecast in
vring_init() should be done with (uintptr_t) instead of (unsigned long).

Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
include/uapi/linux/virtio_ring.h