Skip to content

Commit 40e480e

Browse files
committed
Remove clear_lock() functions, cargo fmt
1 parent f1fa075 commit 40e480e

File tree

1 file changed

+1
-44
lines changed

1 file changed

+1
-44
lines changed

src/register/pmpcfgx.rs

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -128,17 +128,6 @@ pub mod pmpcfg0 {
128128

129129
_set(1 << (7 + (index * 8)));
130130
}
131-
132-
#[inline]
133-
pub unsafe fn clear_lock(index: usize) {
134-
#[cfg(riscv32)]
135-
assert!(index < 4);
136-
137-
#[cfg(riscv64)]
138-
assert!(index < 8);
139-
140-
_clear(1 << (7 + (index * 8)));
141-
}
142131
}
143132

144133
/// Physical memory protection configuration
@@ -198,17 +187,6 @@ pub mod pmpcfg1 {
198187

199188
_set(1 << (7 + (index * 8)));
200189
}
201-
202-
#[inline]
203-
pub unsafe fn clear_lock(index: usize) {
204-
#[cfg(riscv32)]
205-
assert!(index < 4);
206-
207-
#[cfg(riscv64)]
208-
assert!(index < 8);
209-
210-
_clear(1 << (7 + (index * 8)));
211-
}
212190
}
213191

214192
/// Physical memory protection configuration
@@ -268,17 +246,6 @@ pub mod pmpcfg2 {
268246

269247
_set(1 << (7 + (index * 8)));
270248
}
271-
272-
#[inline]
273-
pub unsafe fn clear_lock(index: usize) {
274-
#[cfg(riscv32)]
275-
assert!(index < 4);
276-
277-
#[cfg(riscv64)]
278-
assert!(index < 8);
279-
280-
_clear(1 << (7 + (index * 8)));
281-
}
282249
}
283250

284251
/// Physical memory protection configuration
@@ -337,14 +304,4 @@ pub mod pmpcfg3 {
337304

338305
_set(1 << (7 + (index * 8)));
339306
}
340-
341-
#[inline]
342-
pub unsafe fn clear_lock(index: usize) {
343-
#[cfg(riscv32)]
344-
assert!(index < 4);
345-
346-
#[cfg(riscv64)]
347-
assert!(index < 8);
348-
_clear(1 << (7 + (index * 8)));
349-
}
350-
}
307+
}

0 commit comments

Comments
 (0)