aboutsummaryrefslogtreecommitdiff
path: root/test/dm
diff options
context:
space:
mode:
authorAndrew Scull <ascull@google.com>2022-05-16 10:41:34 +0000
committerTom Rini <trini@konsulko.com>2022-06-08 09:24:03 -0400
commit1674b6c4d820a4139c406d673a3319f785503a5d (patch)
treeca096f3c7b02a83ca336e2a2e17e13499552c83f /test/dm
parentb1fe820b63c45d6ed0c44b67b4a48e5f3ac34bf0 (diff)
downloadu-boot-1674b6c4d820a4139c406d673a3319f785503a5d.zip
u-boot-1674b6c4d820a4139c406d673a3319f785503a5d.tar.gz
u-boot-1674b6c4d820a4139c406d673a3319f785503a5d.tar.bz2
virtio: sandbox: Fix device features bitfield
The virtio sandbox transport was setting the device features value to the bit index rather than shifting a bit to the right index. Fix this using the bit manipulation macros. Signed-off-by: Andrew Scull <ascull@google.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/dm')
-rw-r--r--test/dm/virtio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/dm/virtio.c b/test/dm/virtio.c
index adef105..aa4e3d7 100644
--- a/test/dm/virtio.c
+++ b/test/dm/virtio.c
@@ -77,7 +77,7 @@ static int dm_test_virtio_all_ops(struct unit_test_state *uts)
ut_assertok(virtio_get_status(dev, &status));
ut_asserteq(0, status);
ut_assertok(virtio_get_features(dev, &features));
- ut_asserteq(VIRTIO_F_VERSION_1, features);
+ ut_asserteq_64(BIT_ULL(VIRTIO_F_VERSION_1), features);
ut_assertok(virtio_set_features(dev));
ut_assertok(virtio_find_vqs(dev, nvqs, vqs));
ut_assertok(virtio_del_vqs(dev));