[PATCH v2 0/3] rust: alloc: add Vec::resize and Vec::truncate

Andrew Ballance posted 3 patches 9 months ago
Documentation/gpu/nova/core/todo.rst | 10 -----
rust/kernel/alloc/kvec.rs            | 62 ++++++++++++++++++++++++++++
2 files changed, 62 insertions(+), 10 deletions(-)
[PATCH v2 0/3] rust: alloc: add Vec::resize and Vec::truncate
Posted by Andrew Ballance 9 months ago
This patch series implements the Vec::truncate and Vec::resize methods
that were needed by the nova driver and removes the corresponding item
from their task list

changes in v2:
 - updated safety comments
 - fixed rustdoc comment spacing
 - reworded commit messages to be imperative
 - Link to v1: https://lore.kernel.org/rust-for-linux/20250315024235.5282-1-andrewjballance@gmail.com/

Andrew Ballance (3):
  rust: alloc: add Vec::truncate method
  rust: alloc: add Vec::resize method
  gpu: nova-core: remove completed Vec extentions from task list

 Documentation/gpu/nova/core/todo.rst | 10 -----
 rust/kernel/alloc/kvec.rs            | 62 ++++++++++++++++++++++++++++
 2 files changed, 62 insertions(+), 10 deletions(-)

-- 
2.48.1
Re: [PATCH v2 0/3] rust: alloc: add Vec::resize and Vec::truncate
Posted by Danilo Krummrich 8 months, 2 weeks ago
On 3/16/25 12:16 PM, Andrew Ballance wrote:
> This patch series implements the Vec::truncate and Vec::resize methods
> that were needed by the nova driver and removes the corresponding item
> from their task list
> 
> changes in v2:
>   - updated safety comments
>   - fixed rustdoc comment spacing
>   - reworded commit messages to be imperative
>   - Link to v1: https://lore.kernel.org/rust-for-linux/20250315024235.5282-1-andrewjballance@gmail.com/
> 
> Andrew Ballance (3):
>    rust: alloc: add Vec::truncate method
>    rust: alloc: add Vec::resize method

With the following changes, applied to rust/alloc-next, thanks!

   - Rewrote safety comment of set_len().
   - Use checked_sub(), as suggested by Tamir.

>    gpu: nova-core: remove completed Vec extentions from task list

Applied to nova-next, thanks!

>   Documentation/gpu/nova/core/todo.rst | 10 -----
>   rust/kernel/alloc/kvec.rs            | 62 ++++++++++++++++++++++++++++
>   2 files changed, 62 insertions(+), 10 deletions(-)
>