rust: task: remove use of `addr_of!` macro
Benno Lossin
Reviewed-byQuoted 11 lines · Antonio Hickey
The use of
addr_of!here is unnecessary since its immediately dereferenced. The main benefit ofaddr_of!is to avoid intermediate field loads without immediate dereferencing, so there's no benefit in using it here.We can achieve the same behavior by directly accessing the
group_leaderandpidfields, which is more idiomatic.Suggested-by Benno Lossin <[email protected]>Signed-off-by Antonio Hickey <[email protected]>
Reviewed-by Benno Lossin <[email protected]>
---
Cheers,
Benno
Quoted 3 lines
--- rust/kernel/task.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)