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 5EFDBC5DF6D for ; Wed, 19 Aug 2026 11:19:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BFF9D10EDF5; Wed, 19 Aug 2026 11:19:41 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="BdmBVHTZ"; dkim-atps=neutral Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id EA1B810EDF5 for ; Wed, 19 Aug 2026 11:19:39 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id B3C0F438C7; Wed, 19 Aug 2026 11:19:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 615A41F000E9; Wed, 19 Aug 2026 11:19:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1787138379; bh=U90PQ07lMGeV/S9hY5g+kSc82c9uxFtg9ufXoq+8+PA=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=BdmBVHTZP3NrVRSbodBAmzCo4+jVsV1Ckk1exrq7zS9L4mQPQgvmFIql9pgF4q8// /seok4becnzoqHb+fHuHNDQbw777ys2EVLWqTQtlYmzl4n4p7M3EWO26t6zykxvh/G +2ho/NEwvQ5kzAgk5iHMQD+eLfQN1Ew05c9JxDESp8brtQNgR4rdBP6PnhMWBV/mVD yEmMj2AkcfP1DKZWobVUAyxDfwKSJDeHA6JE2EZsF4dZY3kEcp3vuzo1IfSH42dXyT e7QFxTA2VdXyakv+SuaygTn0crpe9dFIj2pHaD6Jh5W7zIt9kAr5+2izaJCiKryQQP dUa4KsOyDlu+g== From: sashiko-bot@kernel.org Subject: Re: [PATCH v3 04/16] rust: io: perform conversions using `AsRepr` To: "Gary Guo" Cc: ojeda@kernel.org, "Alexandre Courbot" , linux-pci@vger.kernel.org, "Danilo Krummrich" , dri-devel@lists.freedesktop.org In-Reply-To: <20260819-typed_register-v3-4-3699a75fadf1@garyguo.net> References: <20260819-typed_register-v3-0-3699a75fadf1@garyguo.net> <20260819-typed_register-v3-4-3699a75fadf1@garyguo.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Wed, 19 Aug 2026 11:19:38 +0000 Message-Id: <20260819111939.615A41F000E9@smtp.kernel.org> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sashiko-reviews@lists.linux.dev Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" > For types that are layout-compatible with an I/O capable type, we would > want the ability to use them directly for I/O operations. E.g. >=20 > bitfield! { > pub struct Foo(u32) { > ... > } > } >=20 > #[repr(C)] > struct Bar { > foo: Foo, > } >=20 > let mmio: Mmio<'_, Bar> =3D ...; > io_read!(mmio, .foo) >=20 > Currently this feature is available from `register!()` macro but not > otherwise available with `io_read!`, `io_write!`. Support this by > performing conversions to I/O primitives via the `AsRepr`/`AsReprMut` > trait. >=20 > This makes the `IoLoc::IoType` and `Register::Storage` redundant; thus > remove them; also convert register methods to use the `read_val` and > `write_val` instead. >=20 > Signed-off-by: Gary Guo Sashiko has reviewed this patch and found no issues. It looks great! --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20260819-typed_regi= ster-v3-0-3699a75fadf1@garyguo.net?part=3D4