Skip to content

Commit a5e634e

Browse files
committed
fixup! rust: dma_fence: Add DMA Fence abstraction
Signed-off-by: Janne Grunau <j@jannau.net>
1 parent 8c8c011 commit a5e634e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

rust/kernel/dma_fence.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
//! C header: [`include/linux/dma_fence.h`](../../include/linux/dma_fence.h)
66
77
use crate::{
8+
alloc::{flags::*, vec_ext::VecExt},
89
bindings,
910
error::{to_result, Result},
1011
prelude::*,
@@ -445,10 +446,10 @@ impl FenceContexts {
445446
pub fn new(count: u32, name: &'static CStr, key: LockClassKey) -> Result<FenceContexts> {
446447
let mut seqnos: Vec<AtomicU64> = Vec::new();
447448

448-
seqnos.try_reserve(count as usize)?;
449+
seqnos.reserve(count as usize, GFP_KERNEL)?;
449450

450451
for _ in 0..count {
451-
seqnos.try_push(Default::default())?;
452+
seqnos.push(Default::default(), GFP_KERNEL)?;
452453
}
453454

454455
// SAFETY: This is always safe to call

0 commit comments

Comments
 (0)