Explorar o código

Remove clear_lock() functions, cargo fmt

dkhayes117 %!s(int64=3) %!d(string=hai) anos
pai
achega
40e480e8a9
Modificáronse 1 ficheiros con 1 adicións e 44 borrados
  1. 1 44
      src/register/pmpcfgx.rs

+ 1 - 44
src/register/pmpcfgx.rs

@@ -128,17 +128,6 @@ pub mod pmpcfg0 {
 
         _set(1 << (7 + (index * 8)));
     }
-
-    #[inline]
-    pub unsafe fn clear_lock(index: usize) {
-        #[cfg(riscv32)]
-        assert!(index < 4);
-
-        #[cfg(riscv64)]
-        assert!(index < 8);
-
-        _clear(1 << (7 + (index * 8)));
-    }
 }
 
 /// Physical memory protection configuration
@@ -198,17 +187,6 @@ pub mod pmpcfg1 {
 
         _set(1 << (7 + (index * 8)));
     }
-
-    #[inline]
-    pub unsafe fn clear_lock(index: usize) {
-        #[cfg(riscv32)]
-        assert!(index < 4);
-
-        #[cfg(riscv64)]
-        assert!(index < 8);
-
-        _clear(1 << (7 + (index * 8)));
-    }
 }
 
 /// Physical memory protection configuration
@@ -268,17 +246,6 @@ pub mod pmpcfg2 {
 
         _set(1 << (7 + (index * 8)));
     }
-
-    #[inline]
-    pub unsafe fn clear_lock(index: usize) {
-        #[cfg(riscv32)]
-        assert!(index < 4);
-
-        #[cfg(riscv64)]
-        assert!(index < 8);
-
-        _clear(1 << (7 + (index * 8)));
-    }
 }
 
 /// Physical memory protection configuration
@@ -337,14 +304,4 @@ pub mod pmpcfg3 {
 
         _set(1 << (7 + (index * 8)));
     }
-
-    #[inline]
-    pub unsafe fn clear_lock(index: usize) {
-        #[cfg(riscv32)]
-        assert!(index < 4);
-
-        #[cfg(riscv64)]
-        assert!(index < 8);
-        _clear(1 << (7 + (index * 8)));
-    }
-}
+}