Re: [PATCH RESEND] virtio: Fix typecast of pointer in vring_init()

2015-07-06 Thread Thomas Huth
On Sun, 5 Jul 2015 14:59:54 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Sun, Jul 05, 2015 at 12:58:53PM +0200, Michael S. Tsirkin wrote: On Thu, Jul 02, 2015 at 09:21:22AM +0200, Thomas Huth wrote: The virtio_ring.h header is used in userspace programs (ie. QEMU), too. Here we can

Re: [PATCH RESEND] virtio: Fix typecast of pointer in vring_init()

2015-07-06 Thread Thomas Huth
On Mon, 6 Jul 2015 12:50:22 +0300 Michael S. Tsirkin m...@redhat.com wrote: On Mon, Jul 06, 2015 at 11:24:42AM +0200, Thomas Huth wrote: On Sun, 5 Jul 2015 14:59:54 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Sun, Jul 05, 2015 at 12:58:53PM +0200, Michael S. Tsirkin wrote:

Re: [PATCH RESEND] virtio: Fix typecast of pointer in vring_init()

2015-07-06 Thread Michael S. Tsirkin
On Mon, Jul 06, 2015 at 11:24:42AM +0200, Thomas Huth wrote: On Sun, 5 Jul 2015 14:59:54 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Sun, Jul 05, 2015 at 12:58:53PM +0200, Michael S. Tsirkin wrote: On Thu, Jul 02, 2015 at 09:21:22AM +0200, Thomas Huth wrote: The virtio_ring.h

Re: [PATCH RESEND] virtio: Fix typecast of pointer in vring_init()

2015-07-05 Thread Michael S. Tsirkin
On Thu, Jul 02, 2015 at 09:21:22AM +0200, Thomas Huth wrote: 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

Re: [PATCH RESEND] virtio: Fix typecast of pointer in vring_init()

2015-07-05 Thread Michael S. Tsirkin
On Sun, Jul 05, 2015 at 12:58:53PM +0200, Michael S. Tsirkin wrote: On Thu, Jul 02, 2015 at 09:21:22AM +0200, Thomas Huth wrote: 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

[PATCH RESEND] virtio: Fix typecast of pointer in vring_init()

2015-07-02 Thread Thomas Huth
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