• Gonglei's avatar
    virtio_ring: fix complaint by sparse · c60923cb
    Gonglei authored
     # make C=2 CF="-D__CHECK_ENDIAN__" ./drivers/virtio/
    
    drivers/virtio/virtio_ring.c:423:19: warning: incorrect type in assignment (different base types)
    drivers/virtio/virtio_ring.c:423:19:    expected unsigned int [unsigned] [assigned] i
    drivers/virtio/virtio_ring.c:423:19:    got restricted __virtio16 [usertype] next
    drivers/virtio/virtio_ring.c:423:19: warning: incorrect type in assignment (different base types)
    drivers/virtio/virtio_ring.c:423:19:    expected unsigned int [unsigned] [assigned] i
    drivers/virtio/virtio_ring.c:423:19:    got restricted __virtio16 [usertype] next
    drivers/virtio/virtio_ring.c:423:19: warning: incorrect type in assignment (different base types)
    drivers/virtio/virtio_ring.c:423:19:    expected unsigned int [unsigned] [assigned] i
    drivers/virtio/virtio_ring.c:423:19:    got restricted __virtio16 [usertype] next
    drivers/virtio/virtio_ring.c:604:39: warning: incorrect type in initializer (different base types)
    drivers/virtio/virtio_ring.c:604:39:    expected unsigned short [unsigned] [usertype] nextflag
    drivers/virtio/virtio_ring.c:604:39:    got restricted __virtio16
    drivers/virtio/virtio_ring.c:612:33: warning: restricted __virtio16 degrades to integer
    Signed-off-by: default avatarGonglei <arei.gonglei@huawei.com>
    Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    c60923cb
virtio_ring.c 33.2 KB