Explorar el Código

Remove clear_lock() functions, cargo fmt

dkhayes117 hace 3 años
padre
commit
40e480e8a9
Se han modificado 1 ficheros con 1 adiciones y 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)));
-    }
-}
+}