From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 55E6F2F5487; Tue, 3 Feb 2026 17:59:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770141599; cv=none; b=Vnp5H9s3zS1qlZOKrcepOged9ffMXyCW/2PLLXN242ViOOAgDANf5hfvviMJLybLDnj/MiFDjni++B2FVlrylY+cFQA7pHTVrWDWEgYj/5ZLJkMlfoQSdHsb2rVVMorGn87mijVQLTp9TjF0HiRBn4uqUh16iOMGEierLeLG+ps= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770141599; c=relaxed/simple; bh=djqumMHdPK4b2u3nULQU7T3jLxiGWNZFX/0cO0Gwfkw=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:Cc:To:From: References:In-Reply-To; b=dO2LbATlHGsGCID83eTy89SJ4L0sCv5BDy+t7huGLJmUsYeljYjf8ibJ6q7Fr+2avg4m2GH6+uld14D/fT/jaQjspsmaXL1ivUwp5OtqDh0H8DQMx4QFm61fOdQXnxO9HsqEEpwAMNQPk1DNT8cr2jlYSx/YgflC5AMXZR8BCgg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HYV88Kq/; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HYV88Kq/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F1A12C116D0; Tue, 3 Feb 2026 17:59:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1770141599; bh=djqumMHdPK4b2u3nULQU7T3jLxiGWNZFX/0cO0Gwfkw=; h=Date:Subject:Cc:To:From:References:In-Reply-To:From; b=HYV88Kq/dyKjYqxpquD1Bii3I/VinqzaJv27QlmKDIPb203qKq+IpgQ1TPX3xBKQk mzpoLx5emOj08xtP/v74kc/s1UzGgDPoaR1n4VFUUDp8ziSaXMEci6LvD6JhiGU7DP qJq/4+8v6RgCvO9pVDF0jJyeCgKyagUz+onwSbfUQgb7VmsRKExcHgZMeOYPHl2drr DXsSnWOMkgjubIy9fp66MiUnS9rz74YL/46NOI0725ZpHOF6SqtG+Q0edJJnN571yQ BENoAHDmhTOF/HpmSiKzZhcmVM7HkmEJTDoveN1eoYCxrfgauITSrcjde7rRoJw+zc ZOs4JLlALIvjg== Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 03 Feb 2026 18:59:52 +0100 Message-Id: Subject: Re: [PATCH v2 6/6] soc: qcom: socinfo: Convert to Rust Cc: "Greg Kroah-Hartman" , "Matthew Maurer" , "Bjorn Andersson" , "Konrad Dybcio" , "Satya Durga Srinivasu Prabhala" , "Miguel Ojeda" , "Boqun Feng" , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , "Benno Lossin" , "Andreas Hindborg" , "Alice Ryhl" , "Trevor Gross" , "Daniel Almeida" , "Rafael J. Wysocki" , "David Airlie" , "Simona Vetter" , "Michal Wilczynski" , "Dave Ertman" , "Ira Weiny" , "Leon Romanovsky" , "Trilok Soni" , , , , , , To: "Gary Guo" From: "Danilo Krummrich" References: <20260203-qcom-socinfo-v2-0-d6719db85637@google.com> <20260203-qcom-socinfo-v2-6-d6719db85637@google.com> <2026020315-conch-trickle-2d84@gregkh> <2026020347-sneak-embark-1b36@gregkh> In-Reply-To: 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 r= eally > 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, res: &Devres) { let res =3D res.access(dev.parent()); // OK let res =3D res.access(dev.as_ref()); // panic() } Printing a warning is probably a good idea though.