File tree 2 files changed +2
-4
lines changed 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ impl<const ORDER: u32> Pages<ORDER> {
127
127
// so `offset` can't overflow an `isize`.
128
128
let dest = unsafe { ( mapping. ptr as * mut u8 ) . add ( offset) } ;
129
129
// SAFETY: `src` is guaranteed by the caller to be valid for reads, and `dest` is
130
- //valid for writes from the type invariants. Because we're copying `u8`s
130
+ // valid for writes from the type invariants. Because we're copying `u8`s
131
131
// which have an alignment of 1, `src` and `dest` are always properly aligned.
132
132
unsafe { ptr:: copy ( src, dest, len) } ;
133
133
Ok ( ( ) )
Original file line number Diff line number Diff line change @@ -138,9 +138,7 @@ pub unsafe fn call_printk(
138
138
args : fmt:: Arguments < ' _ > ,
139
139
) {
140
140
// `_printk` does not seem to fail in any path.
141
- // SAFETY: references are guaranteed to be valid for reads.
142
- // The caller guarantees that `format_string` is a valid format
143
- // specifier and that `module_name` is null-terminated.
141
+ // SAFETY: this is safe by the safety contract.
144
142
unsafe {
145
143
bindings:: _printk (
146
144
format_string. as_ptr ( ) as _ ,
You can’t perform that action at this time.
0 commit comments