Am Mittwoch, 26. September 2007 schrieb [EMAIL PROTECTED]:
>  include/linux/virtio_config.h   |  111 +++++++++++++++++++++++++

I get the following warnings on s390:
/space/linux-2.6/drivers/block/virtio_blk.c: In function 'virtblk_probe':
/space/linux-2.6/drivers/block/virtio_blk.c:240: warning: passing argument 1 
of '__swab16s' from incompatible pointer type
/space/linux-2.6/drivers/block/virtio_blk.c:240: warning: passing argument 1 
of '__swab32s' from incompatible pointer type
/space/linux-2.6/drivers/block/virtio_blk.c:254: warning: passing argument 1 
of '__swab16s' from incompatible pointer type
/space/linux-2.6/drivers/block/virtio_blk.c:254: warning: passing argument 1 
of '__swab64s' from incompatible pointer type
/space/linux-2.6/drivers/block/virtio_blk.c:262: warning: passing argument 1 
of '__swab16s' from incompatible pointer type
/space/linux-2.6/drivers/block/virtio_blk.c:262: warning: passing argument 1 
of '__swab64s' from incompatible pointer type

So what about:

---
 include/linux/virtio_config.h |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Index: linux-2.6/include/linux/virtio_config.h
===================================================================
--- linux-2.6.orig/include/linux/virtio_config.h
+++ linux-2.6/include/linux/virtio_config.h
@@ -85,9 +85,9 @@ struct virtio_config_ops
                     && sizeof(*(v)) != 4 && sizeof(*(v)) != 8);        \
        if (!_err) {                                                    \
                switch (sizeof(*(v))) {                                 \
-               case 2: le16_to_cpus(v); break;                         \
-               case 4: le32_to_cpus(v); break;                         \
-               case 8: le64_to_cpus(v); break;                         \
+               case 2: le16_to_cpus((__u16 *) v); break;               \
+               case 4: le32_to_cpus((__u32 *) v); break;               \
+               case 8: le64_to_cpus((__u64 *) v); break;               \
                }                                                       \
        }                                                               \
        _err;                                                           \


_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/virtualization

Reply via email to