Skip to content

Commit 4e72a62

Browse files
tamirdojeda
authored andcommitted
rust: uaccess: name the correct function
Correctly refer to `reserve` rather than `try_reserve` in a comment. This comment has been incorrect since inception in commit 1b580e7 ("rust: uaccess: add userspace pointers"). Fixes: 1b580e7 ("rust: uaccess: add userspace pointers") Signed-off-by: Tamir Duberstein <[email protected]> Reviewed-by: Alice Ryhl <[email protected]> Reviewed-by: Benno Lossin <[email protected]> Reviewed-by: Charalampos Mitrodimas <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
1 parent f6be7af commit 4e72a62

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

rust/kernel/uaccess.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,7 @@ impl UserSliceReader {
285285
let len = self.length;
286286
buf.reserve(len, flags)?;
287287

288-
// The call to `try_reserve` was successful, so the spare capacity is at least `len` bytes
289-
// long.
288+
// The call to `reserve` was successful, so the spare capacity is at least `len` bytes long.
290289
self.read_raw(&mut buf.spare_capacity_mut()[..len])?;
291290

292291
// SAFETY: Since the call to `read_raw` was successful, so the next `len` bytes of the

0 commit comments

Comments
 (0)