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 D313B299927; Tue, 3 Feb 2026 16:29:23 +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=1770136163; cv=none; b=SRjvqGRotBCTwiOT5GjsOplsCzT1u7+VyODnf7y2oEtSjk4EQoqV5gxVBX7wsCM8/mQP6gm9hQEOIfEoY36ZAAdUDjYfn4TWUCGmRuWw2klZageTv7s+Yg+e4miw3vu7VVUiOtm0weQMJuo3s2iNgxhvGRZK979uHZtfO0kzJU8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770136163; c=relaxed/simple; bh=FfyDH8l1QGBNfc5KpjHWRkafoUyts8NRjsB26ikGaJE=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:Cc:To:From: References:In-Reply-To; b=jLrNYGqY4v0f9vSEZ1+P94NWjeEs9im78zTUp9VdRVzkTEGUL8BijLya6vw87aVDcRMH8wwvQgT1DQIBdpH0Rt5N9eT/5HyCZL8A2o6Sgc8Wpg8kAqPf00gEwvDAy4vvSLFEAvmFfDLEMgOnNufsCzFhU+G5KR8Zxzh+PTjEMAA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lvJBgqVq; 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="lvJBgqVq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 66768C2BC87; Tue, 3 Feb 2026 16:29:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1770136163; bh=FfyDH8l1QGBNfc5KpjHWRkafoUyts8NRjsB26ikGaJE=; h=Date:Subject:Cc:To:From:References:In-Reply-To:From; b=lvJBgqVqLGE1cn54IpO/ZvWT7HCDjwhSe0NV+7zLwq2OSZUiSvim6tQcfsG+H/wAr 75a5LOf6zBQinjg9f7w9Lt8x/vhkzHKR3Tk1+TaGjny+WDx1KYiwQbtnJqCcc7ikV8 ovxyy8wNUCuYCeo+8uvoZlHL++Ru+wB4mIogM2IOGzaH8SlNW2cBlFLQlBgQfNNtaN R7zfDICXAUXilWzSjmUjBE02NemSuXfIeoiNkOg/cYo+RRbF6EZb0y5BPdSH1YaIRu BLBe73JsutlYeqMXGzn35W1nTk3FsSWrhvkK1HnHRwbUnC2cdrUmL5oyCZukfcQ/ME BfKqg1OGG3lQw== Precedence: bulk X-Mailing-List: linux-pwm@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 17:29:16 +0100 Message-Id: Subject: Re: [PATCH v2 3/6] rust: device: Support testing devices for equality Cc: "Matthew Maurer" , "Bjorn Andersson" , "Konrad Dybcio" , "Satya Durga Srinivasu Prabhala" , "Miguel Ojeda" , "Boqun Feng" , "Gary Guo" , =?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: "Greg Kroah-Hartman" From: "Danilo Krummrich" References: <20260203-qcom-socinfo-v2-0-d6719db85637@google.com> <20260203-qcom-socinfo-v2-3-d6719db85637@google.com> <2026020338-gratitude-overplay-98b0@gregkh> In-Reply-To: <2026020338-gratitude-overplay-98b0@gregkh> On Tue Feb 3, 2026 at 5:17 PM CET, Greg Kroah-Hartman wrote: > And I don't see what patch in this series uses this, am I missing it? impl Smem { pub(crate) fn access<'a>(&'a self, dev: &'a Device) -> Option<&= 'a Mmio> { if *dev !=3D *self.dev { return None; } =09 // SAFETY: By our invariant, this was a subrange of what was retur= ned by smem_aux_get, for // self.dev, and by our above check, that auxdev is still availabl= e. Some(unsafe { Mmio::from_raw(&self.raw) }) } } It's used to ensure that the Smem provided by the auxiliary parent can only= be accessed as long as the auxiliary parent device is bound.