File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 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> {
127127 // so `offset` can't overflow an `isize`.
128128 let dest = unsafe { ( mapping. ptr as * mut u8 ) . add ( offset) } ;
129129 // 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
131131 // which have an alignment of 1, `src` and `dest` are always properly aligned.
132132 unsafe { ptr:: copy ( src, dest, len) } ;
133133 Ok ( ( ) )
Original file line number Diff line number Diff line change @@ -138,9 +138,7 @@ pub unsafe fn call_printk(
138138 args : fmt:: Arguments < ' _ > ,
139139) {
140140 // `_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.
144142 unsafe {
145143 bindings:: _printk (
146144 format_string. as_ptr ( ) as _ ,
You can’t perform that action at this time.
0 commit comments