Thread (33 messages) 33 messages, 6 authors, 2026-04-02

Re: [PATCH v2 6/6] soc: qcom: socinfo: Convert to Rust

From: "Danilo Krummrich" <dakr@kernel.org>
Date: 2026-02-03 17:59:59
Also in: dri-devel, driver-core, linux-arm-msm, linux-pwm, lkml

On Tue Feb 3, 2026 at 6:17 PM CET, Gary Guo wrote:
PS. Personally I think this check (and the one in Devres::access) should use
assertion rather than `EINVAL`, because it is a bad driver bug when this is hit,
and adding failing code path for something that is a bug is something I really
dislike... It should at least be a `WARN`.
I don't think we should panic in this case, as it can happen too easily.

	// Let's assume the resource is owned by the parent.
	fn foo(adev: &auxiliary::Device<Bound>, res: &Devres<Resource>) {
	    let res = res.access(dev.parent()); // OK
	    let res = res.access(dev.as_ref()); // panic()
	}

Printing a warning is probably a good idea though.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help