On 03/28/2014 11:57 AM, Greg Kurz wrote:
From: Rusty Russell <ru...@rustcorp.com.au>

Note that st*_raw and ld*_raw are effectively replaced by st*_p and ld*_p.

Signed-off-by: Rusty Russell <ru...@rustcorp.com.au>
Reviewed-by: Anthony Liguori <aligu...@us.ibm.com>
[ use per-device needs_byteswap flag,
   Greg Kurz <gk...@linux.vnet.ibm.com> ]
Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com>
---
  hw/block/virtio-blk.c |   40 +++++++++++++++++++++++-----------------
  1 file changed, 23 insertions(+), 17 deletions(-)

diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index 8a568e5..c652ff2 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -26,6 +26,7 @@
  # include <scsi/sg.h>
  #endif
  #include "hw/virtio/virtio-bus.h"
+#include "hw/virtio/virtio-access.h"
typedef struct VirtIOBlockReq
  {
@@ -77,7 +78,9 @@ static void virtio_blk_rw_complete(void *opaque, int ret)
      trace_virtio_blk_rw_complete(req, ret);
if (ret) {
-        bool is_read = !(ldl_p(&req->out->type) & VIRTIO_BLK_T_OUT);
+        bool is_read =
+            !(virtio_ldl_p(&req->out->type,
+                           VIRTIO_DEVICE(req->dev)) & VIRTIO_BLK_T_OUT);

Any way you could fit this into the line limit by extracting part of it into a separate variable?


Alex


Reply via email to