OSDN Git Service

qtest/ahci: Bookmark FB and CLB pointers
authorJohn Snow <jsnow@redhat.com>
Mon, 19 Jan 2015 20:16:02 +0000 (15:16 -0500)
committerStefan Hajnoczi <stefanha@redhat.com>
Mon, 16 Feb 2015 15:02:10 +0000 (15:02 +0000)
commitf3dd2da4cc8c17921cb50920600adafb02959abf
treee4e8ff7f8c55f88296e7d4e27c0a4c2f00f34c7d
parent1a8bba4ddce44cff33bfd3d4976fb33923c06a1b
qtest/ahci: Bookmark FB and CLB pointers

Instead of re-querying the AHCI device for the FB and CLB buffers, save
the pointer we gave to the device during initialization and reference
these values instead.

[Peter Maydell <peter.maydell@linaro.org> reported the following clang
compiler warnings:

  tests/libqos/ahci.c:256:40: warning: format specifies type 'unsigned
      long' but the argument has type 'uint64_t'
      (aka 'unsigned long long') [-Wformat]
        g_test_message("CLB: 0x%08lx", ahci->port[i].clb);
  tests/libqos/ahci.c:264:39: warning: format specifies type 'unsigned
      long' but the argument has type 'uint64_t'
      (aka 'unsigned long long') [-Wformat]
        g_test_message("FB: 0x%08lx", ahci->port[i].fb);

The commit moved from uint32_t to uint64_t, so PRIx64 should be used for
the format specifier.
--Stefan]

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1421698563-6977-15-git-send-email-jsnow@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
tests/ahci-test.c
tests/libqos/ahci.h