]> Git Repo - qemu.git/commitdiff
s390: Drop set_bit usage in virtio_ccw.
authorCornelia Huck <[email protected]>
Tue, 29 Jan 2013 15:33:04 +0000 (16:33 +0100)
committerAlexander Graf <[email protected]>
Tue, 29 Jan 2013 20:50:05 +0000 (21:50 +0100)
set_bit on indicators doesn't go well on 32 bit targets:

note: expected 'long unsigned int *' but argument is of type 'uint64_t *'

Switch to bit shifts instead.

Signed-off-by: Cornelia Huck <[email protected]>
[agraf: use 1ULL instead]
Signed-off-by: Alexander Graf <[email protected]>
hw/s390x/virtio-ccw.c

index 7d7f33637fc5d3b2737241b55a012e939c13e2d9..231f81e48cc66968c945a76b60377f799098abd9 100644 (file)
@@ -662,12 +662,12 @@ static void virtio_ccw_notify(DeviceState *d, uint16_t vector)
 
     if (vector < VIRTIO_PCI_QUEUE_MAX) {
         indicators = ldq_phys(dev->indicators);
-        set_bit(vector, &indicators);
+        indicators |= 1ULL << vector;
         stq_phys(dev->indicators, indicators);
     } else {
         vector = 0;
         indicators = ldq_phys(dev->indicators2);
-        set_bit(vector, &indicators);
+        indicators |= 1ULL << vector;
         stq_phys(dev->indicators2, indicators);
     }
 
This page took 0.025703 seconds and 4 git commands to generate.