]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
rust: opp: simplify callers of `to_c_str_array`
authorTamir Duberstein <tamird@kernel.org>
Thu, 23 Oct 2025 13:59:39 +0000 (09:59 -0400)
committerViresh Kumar <viresh.kumar@linaro.org>
Thu, 23 Oct 2025 15:21:17 +0000 (20:51 +0530)
commit33ffb0aa8ce8b18aaa65e0f9346d52b4e314ad7d
treeed78d7696e541ad8a3156d5c091f4deab88b68f0
parent173e02d674946ff3ef8da7f44a9d5b820b9af21c
rust: opp: simplify callers of `to_c_str_array`

Use `Option` combinators to make this a bit less noisy.

Wrap the `dev_pm_opp_set_config` operation in a closure and use type
ascription to leverage the compiler to check for use after free.

Signed-off-by: Tamir Duberstein <tamird@kernel.org>
Tested-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
rust/kernel/opp.rs