From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 F09C738A722; Fri, 12 Jun 2026 20:17:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781295457; cv=none; b=QRed6uazNxZSO30WpKNMYHa1LTYhzW0SfTQKzuTtn1IbBV/GEMvMnB5yLEcqwLbdqMQw5AKwHqwPU5ChQ0oJdN0IytaZttRZTnItbjjGAllUK8gDC+T+ry7ftE+dD8uU3xxk+j1+wqNBa9GpdRTgUA9o3sO7uc9mQxLUQctOnaY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781295457; c=relaxed/simple; bh=RJfOP6QiAj/BixILRrnrPsmmos3KT5ZLsJo7dqbrU6g=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:Cc:To:From: References:In-Reply-To; b=oX83cZYFU6Y5eQL9YqUDhPq77WZnrAUVuNEbWb0lflC39y4PDFFPOG2maI9HukEwSORZGxfgOwyYS7fL4hfVbcDhGp2w/addYnxk0kAbal0ihwJ0nq5p6blOPjpirfEFtt5ckseqgrQzd8Ctpm5XjraDsZ+oCrdY9nya9CC8zVU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GdpxwRGB; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="GdpxwRGB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1E2371F000E9; Fri, 12 Jun 2026 20:17:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1781295456; bh=pJzuNVWTNf+53sy5yuKPcqhP0sKI2LYYj8cvjNu/tSM=; h=Date:Subject:Cc:To:From:References:In-Reply-To; b=GdpxwRGBrf+qpXAR4d0Nz/svA8GnlSNp4xm1JkRSb71qW3Vv6kndMHbj1bAUWD/NM clLsSWhWXgMw0G4JPYmRM1CVs9R4G39GEuZpZ8fhyLOmcvFBNi/AdHdY76Jjw9J8le HVVbR0yVWHjAT7t0VQT1yh5x+i4wH10aW4joDeSLt0a5oqmAlMnSdwwk6OBm4FMmF7 ap9Q4T0B+POpHfHaBJVwAdSxLuXzvSiaMfoJvQP2RVNluhx8jpaR13jfqs3ewInCWY 7PYGYcg87etPCjusox7PGggnG6MQ9ng+hjaQeZQ3PMA9sVyoKm3sDk98mVHBeK8PkO AN9JkZRDDvjNg== 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: Fri, 12 Jun 2026 22:17:30 +0200 Message-Id: Subject: Re: [PATCH v20 3/4] rust: faux: Allow retrieving a bound Device Cc: "Lyude Paul" , , , , "Alexandre Courbot" , =?utf-8?q?Christian_K=C3=B6nig?= , , "Miguel Ojeda" , "Maarten Lankhorst" , "Alice Ryhl" , "Simona Vetter" , , "Sumit Semwal" , , "Rafael J . Wysocki" , "Thomas Zimmermann" , "Maxime Ripard" , "David Airlie" , "Benno Lossin" , , "Mukesh Kumar Chaurasiya" , "Asahi Lina" , "Daniel Almeida" , "Greg Kroah-Hartman" To: "Gary Guo" From: "Danilo Krummrich" References: <20260610162433.923550-1-lyude@redhat.com> <20260610162433.923550-4-lyude@redhat.com> In-Reply-To: On Fri Jun 12, 2026 at 9:02 PM CEST, Gary Guo wrote: >> +impl AsRef> for Registration { >> + fn as_ref(&self) -> &device::Device { >> + // SAFETY: >> + // - The underlying `device` in `faux_device` is guaranteed by = the C API to be a valid >> + // initialized `device`. >> + // - faux_match() always returns 1, and probe runs synchronousl= y (PROBE_FORCE_SYNCHRONOUS). > > Please quote all code with backticks. As far as I'm concerned there's no need to do that for things that are not rendered anyway. But also feel free to do it anyway of course. Thanks, Danilo