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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 555ADCD98CE for ; Fri, 12 Jun 2026 20:17:42 +0000 (UTC) Received: from kara.freedesktop.org (unknown [131.252.210.166]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1A41910F6B5; Fri, 12 Jun 2026 20:17:40 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="GdpxwRGB"; dkim-atps=neutral Received: from kara.freedesktop.org (localhost [127.0.0.1]) by kara.freedesktop.org (Postfix) with ESMTP id 4E38446ABE; Fri, 12 Jun 2026 20:03:37 +0000 (UTC) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=lists.freedesktop.org; s=20240201; t=1781294617; b=NiBQojtOqP4VX4dL5lNV1pSPFVv5YykgdI9j1lwH443FZG0I+sYljbeb2Db4m1AYT3pNt nqMc6MrsSoq4MGrvGQieQktUQAztDP3r9sbWPtnliIxSdCymfRE0ocax2Qg2Pa1vl7gisv/ Tc2ajaeeixGgWBY4NZ5m7wuc2UE+pRIzrOiM8wKA3frNUHntNt3TTgyFatk0P9LtRsMjbuz jmN008oR9cj8Clcd3imrtcYT0qlSh82CG8CvUnuk/6CuwPPipSxEdLSo6nOc49h4GkJbjUL biW3rWlgJQMsK2skEhLnRq94c1+rew9VhlieFCOQNn4t1HGGVjjVGcrtwWZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.freedesktop.org; s=20240201; t=1781294617; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=pJzuNVWTNf+53sy5yuKPcqhP0sKI2LYYj8cvjNu/tSM=; b=P0lIQ/G5AME/KAekux+5sqAMZIIudkhwf6IOFDnRdGQOI30o58QT/M3OlO1RvRky5DBRn yotifwptUIoq9MKKJY8SNMed2KVlNW5tef/wLH22zGTT0beGeQ2Gt3TG0QTiIbl4CU6znji XyE6PqrZNBr3R6riv4ZbQwFhSc4BB0sRpM6oWwhP0LzcKd+VRGK8H5Pl/Xyv45w+Pt242fG acQVrHEg2wf4lorKV+InuiKUV1ny18t3utP8nkvczkUg1UpOWu4DnDuv64TEazrHfjz9ICz u8UM175tjYmgcVEv0echHGcq96aGRjb8gEN03Fs3tGbAJU0WchZbIOTaUShw== ARC-Authentication-Results: i=1; mail.freedesktop.org; dkim=pass header.d=kernel.org; arc=none (Message is not ARC signed); dmarc=pass (Used From Domain Record) header.from=kernel.org policy.dmarc=quarantine Authentication-Results: mail.freedesktop.org; dkim=pass header.d=kernel.org; arc=none (Message is not ARC signed); dmarc=pass (Used From Domain Record) header.from=kernel.org policy.dmarc=quarantine Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by kara.freedesktop.org (Postfix) with ESMTPS id 5DC3946A78 for ; Fri, 12 Jun 2026 20:03:34 +0000 (UTC) Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id E6FF510F5D8; Fri, 12 Jun 2026 20:17:36 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id A9F2B41665; Fri, 12 Jun 2026 20:17:36 +0000 (UTC) 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== 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 To: "Gary Guo" From: "Danilo Krummrich" References: <20260610162433.923550-1-lyude@redhat.com> <20260610162433.923550-4-lyude@redhat.com> In-Reply-To: Message-ID-Hash: UKJIMPSJW3M3AVEKSSII6TXLYOUXAIOH X-Message-ID-Hash: UKJIMPSJW3M3AVEKSSII6TXLYOUXAIOH X-MailFrom: dakr@kernel.org X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation CC: dri-devel@lists.freedesktop.org, rust-for-linux@vger.kernel.org, nouveau@lists.freedesktop.org, Alexandre Courbot , =?utf-8?q?Christian_K=C3=B6nig?= , driver-core@lists.linux.dev, Miguel Ojeda , Maarten Lankhorst , Alice Ryhl , Simona Vetter , linux-kernel@vger.kernel.org, Sumit Semwal , linux-media@vger.kernel.org, "Rafael J . Wysocki" , Maxime Ripard , Benno Lossin , linaro-mm-sig@lists.linaro.org, Mukesh Kumar Chaurasiya , Asahi Lina , Daniel Almeida , Greg Kroah-Hartman X-Mailman-Version: 3.3.8 Precedence: list List-Id: Nouveau development list Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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