From 91778ed00901da9ea3f538dfa1f758bfce99192c Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Mon, 8 Nov 2021 09:23:44 +0530 Subject: [PATCH] i2c: Remove unused `mem` field Removed the unused `mem` field. Signed-off-by: Viresh Kumar --- src/i2c/src/vhu_i2c.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/i2c/src/vhu_i2c.rs b/src/i2c/src/vhu_i2c.rs index 6c784da..5b0dc80 100644 --- a/src/i2c/src/vhu_i2c.rs +++ b/src/i2c/src/vhu_i2c.rs @@ -86,7 +86,6 @@ unsafe impl ByteValued for VirtioI2cInHdr {} pub struct VhostUserI2cBackend { i2c_map: Arc>, event_idx: bool, - mem: Option>, pub exit_event: EventFd, } @@ -95,7 +94,6 @@ impl VhostUserI2cBackend { Ok(VhostUserI2cBackend { i2c_map, event_idx: false, - mem: None, exit_event: EventFd::new(EFD_NONBLOCK).map_err(Error::EventFdFailed)?, }) } @@ -249,9 +247,8 @@ impl VhostUserBackendMut fn update_memory( &mut self, - mem: GuestMemoryAtomic, + _mem: GuestMemoryAtomic, ) -> VhostUserBackendResult<()> { - self.mem = Some(mem); Ok(()) }