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 DD8C0C43458 for ; Thu, 2 Jul 2026 12:35:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3485510F33E; Thu, 2 Jul 2026 12:35:33 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="JIvBQkQT"; 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 C77C210F33E for ; Thu, 2 Jul 2026 12:35:31 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 7D1EC41779; Thu, 2 Jul 2026 12:35:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ACC7B1F000E9; Thu, 2 Jul 2026 12:35:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1782995731; bh=b/sJt11Ayl+djgh4REyt391Nu3np/UCqGpQ9OJ8jYBQ=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=JIvBQkQTQqDr3gFNL8Knt3JcZMQbHYiiuq25thcq4N6QywWoTpy3dYwra0tNyyZPx w4+ifIVOn4REu2OdPHDEUScC6Dy6XS7GrOboSPd9nQgWZ+19+cg5eoa97u6YxRozE1 0JmzrB0ZeqOEXN2+mIfDaGg6K5rHIBCGICCr218fSHoLjZRho1O+f8tejf2+SyM6Ek kU8r7qCFUKGD08l0TsU3S6nZMRi42NUBN3HtKt1aVQNRb3O4jJeZSXgej//xEXaqAn sxLvgWSG8ugJIqnNMLIuH52PThm1Swbew1eEyFqo6joKHcuXxsqZH3W66diy4SbRRa +lNCBIuJjlWwQ== From: sashiko-bot@kernel.org Subject: Re: [PATCH] rust: device_id: rename IdTable::as_ptr to as_raw_id_table() To: "Alice Ryhl" Cc: ojeda@kernel.org, linux-pci@vger.kernel.org, dri-devel@lists.freedesktop.org In-Reply-To: <20260702-idtable-rename-asptr-v1-1-e0927273c71a@google.com> References: <20260702-idtable-rename-asptr-v1-1-e0927273c71a@google.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 02 Jul 2026 12:35:29 +0000 Message-Id: <20260702123530.ACC7B1F000E9@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" > The current name of `as_ptr` is very generic, and if you attempt to > invoke `foo.as_ptr()` on a type for which this method is missing, then > an error along these lines will be printed: >=20 > error[E0599]: no method named `as_ptr` found for reference `&DmaBuf` in = the current scope > --> linux/rust/kernel/dma_buf/buf.rs:54:38 > | > 54 | ptr::eq(self.as_ptr(), other.as_ptr()) > | ^^^^^^ method not found in `&= DmaBuf` > | > =3D help: items from traits can only be used if the trait is impleme= nted and in scope > note: `device_id::IdTable` defines an item `as_ptr`, perhaps you need to= implement it > --> linux/rust/kernel/device_id.rs:165:1 > | > 165 | pub trait IdTable { > | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >=20 > Suggesting the IdTable trait when an as_ptr() method is missing is not > useful. Renaming it to `as_raw_id_table` makes the method name unique to > this trait and avoids these bad suggestions. >=20 > Assisted-by: Antigravity:Gemini > Signed-off-by: Alice Ryhl Sashiko has reviewed this patch and found no issues. It looks great! --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20260702-idtable-re= name-asptr-v1-1-e0927273c71a@google.com?part=3D1