diff options
author | Andrew Scull <ascull@google.com> | 2022-05-16 10:41:34 +0000 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-06-08 09:24:03 -0400 |
commit | 1674b6c4d820a4139c406d673a3319f785503a5d (patch) | |
tree | ca096f3c7b02a83ca336e2a2e17e13499552c83f /test/dm | |
parent | b1fe820b63c45d6ed0c44b67b4a48e5f3ac34bf0 (diff) | |
download | u-boot-1674b6c4d820a4139c406d673a3319f785503a5d.tar.gz u-boot-1674b6c4d820a4139c406d673a3319f785503a5d.tar.bz2 u-boot-1674b6c4d820a4139c406d673a3319f785503a5d.zip |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/dm/virtio.c b/test/dm/virtio.c index adef10592c..aa4e3d778e 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)); |