summary refs log tree commit diff
path: root/devices/src/register_space/register_space.rs
Commit message (Collapse)AuthorAge
* Reformat with rustfmt from Rust 1.38.0Daniel Verkamp2019-10-17
| | | | | | | | | | | | | | | | This just removes a few extraneous blank lines that the new rustfmt doesn't like. BUG=None TEST=bin/fmt --check Change-Id: I4482f873bdfe19f2f73f86cfdd99d6cce873593c Signed-off-by: Daniel Verkamp <dverkamp@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1863000 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Stephen Barber <smbarber@chromium.org> Reviewed-by: Zach Reizner <zachr@chromium.org> Reviewed-by: Dylan Reid <dgreid@chromium.org>
* clippy: Resolve assign_op_patternDavid Tolnay2019-04-17
| | | | | | | | | | | TEST=bin/clippy Change-Id: I1cb259f399f9aff2b9b745413f9a28e130688a2b Reviewed-on: https://chromium-review.googlesource.com/1566657 Commit-Ready: David Tolnay <dtolnay@chromium.org> Tested-by: David Tolnay <dtolnay@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
* devices: usb: remove unused imports in testsDaniel Verkamp2019-04-10
| | | | | | | | | | | | | | Clean up warnings when building tests. BUG=None TEST=cargo test -p devices; FEATURES=test emerge-nami crosvm Change-Id: I0efe723fee37c822a6bdd4a88766b37d559833d8 Signed-off-by: Daniel Verkamp <dverkamp@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1560092 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: David Tolnay <dtolnay@chromium.org>
* edition: Use dyn syntax for trait objectsDavid Tolnay2019-04-08
| | | | | | | | | | | | | | | | | | | | | Found by running: `cargo rustc -- -D bare_trait_objects` Bare trait objects like `&Trait` and `Box<Trait>` are soft-deprecated in 2018 edition and will start warning at some point. As part of this, I replaced `Box<Trait + 'static>` with `Box<dyn Trait>` because the 'static bound is implied for boxed trait objects. TEST=cargo check --all-features TEST=cargo check --target aarch64-unknown-linux-gnu TEST=local kokoro Change-Id: I41c4f13530bece8a34a8ed1c1afd7035b8f86f19 Reviewed-on: https://chromium-review.googlesource.com/1513059 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: David Tolnay <dtolnay@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: David Tolnay <dtolnay@chromium.org>
* register_space: Only run panic test when debug assertions are onChirantan Ekbote2019-03-13
| | | | | | | | | | | | | | | | | | The regs_reg_overlap() test is a panic test but the function that it is testing only uses debug_asserts so the test will fail if debug assertions are disabled. Only run the test when debug assertions are enabled. BUG=chromium:940668 TEST=`FEATURES=test USE=-cros-debug emerge-nami crosvm` Change-Id: Ie722cb49908ae4c4a9ecc5f248a6ec25fbcc05c9 Reviewed-on: https://chromium-review.googlesource.com/1518729 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Jeffrey Kardatzke <jkardatzke@google.com> Reviewed-by: Zach Reizner <zachr@chromium.org> Reviewed-by: Dylan Reid <dgreid@chromium.org>
* rename mmio_space to register spaceJingkui Wang2019-03-08
| | | | | | | | | | | | | | | | rename mmio_space to register_space, mmio_register to register. BUG=chromium:831850 TEST=local build CQ-DEPEND=CL:1509515 Change-Id: Ia229be984d38ca8445828fdfa132bdbbedb74c33 Reviewed-on: https://chromium-review.googlesource.com/1509516 Commit-Ready: Zach Reizner <zachr@chromium.org> Tested-by: Jingkui Wang <jkwang@google.com> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Jingkui Wang <jkwang@google.com> Reviewed-by: Zach Reizner <zachr@chromium.org>
* register_space: use sync::Mutex instead of std::sync::MutexJingkui Wang2019-03-08
| | | | | | | | | | | | | Then we don't need to unwrap BUG=chromium:831850 TEST=cargo test CQ-DEPEND=CL:1506828 Change-Id: I4200ea6351d61df1974e5e4c8583e783b21ea0eb Reviewed-on: https://chromium-review.googlesource.com/1509514 Commit-Ready: Zach Reizner <zachr@chromium.org> Tested-by: Jingkui Wang <jkwang@google.com> Reviewed-by: Jingkui Wang <jkwang@google.com>
* Move and rename mmio_register to devices/srcJingkui Wang2019-03-08
A later CL will rename structs. BUG=chromium:831850 TEST=local build Change-Id: I8cf70da16918035a6fad2e925f91a315693ff1ed Reviewed-on: https://chromium-review.googlesource.com/1506828 Commit-Ready: Zach Reizner <zachr@chromium.org> Tested-by: Jingkui Wang <jkwang@google.com> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Zach Reizner <zachr@chromium.org>