Skip to content

Commit ca3f7c0

Browse files
committed
drm/asahi: microseq: Clippy fixes
Signed-off-by: Asahi Lina <[email protected]>
1 parent 174e57c commit ca3f7c0

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/gpu/drm/asahi/microseq.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ impl Builder {
4646
let off = self.ops.len();
4747
let p: *const T = &op;
4848
let p: *const u8 = p as *const u8;
49+
// SAFETY: Microseq operations always have no padding bytes, so it is safe to
50+
// access them as a byte slice.
4951
let s: &[u8] = unsafe { core::slice::from_raw_parts(p, core::mem::size_of::<T>()) };
5052
self.ops.extend_from_slice(s, GFP_KERNEL)?;
5153
Ok(off as i32)

0 commit comments

Comments
 (0)