Commit d73820df authored by Johannes Berg's avatar Johannes Berg Committed by Richard Weinberger

um: virt-pci: Fix 32-bit compile

There were a few 32-bit compile warnings that of course
turned into errors with -Werror, fix the 32-bit build.

Fixes: 68f5d3f3 ("um: add PCI over virtio emulation driver")
Reported-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 4b86366f
...@@ -181,15 +181,15 @@ static unsigned long um_pci_cfgspace_read(void *priv, unsigned int offset, ...@@ -181,15 +181,15 @@ static unsigned long um_pci_cfgspace_read(void *priv, unsigned int offset,
/* buf->data is maximum size - we may only use parts of it */ /* buf->data is maximum size - we may only use parts of it */
struct um_pci_message_buffer *buf; struct um_pci_message_buffer *buf;
u8 *data; u8 *data;
unsigned long ret = ~0ULL; unsigned long ret = ULONG_MAX;
if (!dev) if (!dev)
return ~0ULL; return ULONG_MAX;
buf = get_cpu_var(um_pci_msg_bufs); buf = get_cpu_var(um_pci_msg_bufs);
data = buf->data; data = buf->data;
memset(data, 0xff, sizeof(data)); memset(buf->data, 0xff, sizeof(buf->data));
switch (size) { switch (size) {
case 1: case 1:
...@@ -304,7 +304,7 @@ static unsigned long um_pci_bar_read(void *priv, unsigned int offset, ...@@ -304,7 +304,7 @@ static unsigned long um_pci_bar_read(void *priv, unsigned int offset,
/* buf->data is maximum size - we may only use parts of it */ /* buf->data is maximum size - we may only use parts of it */
struct um_pci_message_buffer *buf; struct um_pci_message_buffer *buf;
u8 *data; u8 *data;
unsigned long ret = ~0ULL; unsigned long ret = ULONG_MAX;
buf = get_cpu_var(um_pci_msg_bufs); buf = get_cpu_var(um_pci_msg_bufs);
data = buf->data; data = buf->data;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment