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 8A11FCD98F0 for ; Mon, 22 Jun 2026 02:55:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DE3BD10E436; Mon, 22 Jun 2026 02:55:47 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=linux.dev header.i=@linux.dev header.b="Tto3Rx1j"; dkim-atps=neutral Received: from out-186.mta0.migadu.com (out-186.mta0.migadu.com [91.218.175.186]) by gabe.freedesktop.org (Postfix) with ESMTPS id A826210E436 for ; Mon, 22 Jun 2026 02:55:45 +0000 (UTC) Message-ID: <02e9be5f-8dfa-4a4f-8a70-627ed1124b91@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1782096942; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xPT6DAdg86ekeubsFUyJE8zxGgUJMoz3jyqa9JhEVkU=; b=Tto3Rx1jAaHFtdkhawr4dGV2oKUQ+FH3oxDMEtfUe30AqTgIxxAqLJzSwSTl3FHaQCi9kl 8DSHCQJxWmTNAgouSdXaK156DzQRkSoeITF8p9plSxjrB2oLwl/FA9EjLfTd3z4zp8l83i Ss3MyZcgf5r8XpkmwL+rT4BP/ncSct4= Date: Mon, 22 Jun 2026 10:52:44 +0800 MIME-Version: 1.0 Subject: Re: [PATCH v2 3/7] rust: doctest: add LocalModule fallback for #[vtable] ThisModule To: Andreas Hindborg , Gary Guo , Miguel Ojeda , Boqun Feng , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Alice Ryhl , Trevor Gross , Danilo Krummrich , Luis Chamberlain , Petr Pavlu , Daniel Gomez , Sami Tolvanen , Aaron Tomlin , Greg Kroah-Hartman , "Rafael J. Wysocki" , David Airlie , Simona Vetter , Daniel Almeida , Arnd Bergmann , Brendan Higgins , David Gow , Rae Moar , Breno Leitao , Jens Axboe Cc: rust-for-linux@vger.kernel.org, linux-modules@vger.kernel.org, driver-core@lists.linux.dev, dri-devel@lists.freedesktop.org, nova-gpu@lists.linux.dev, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-block@vger.kernel.org References: <20260521-fix-fops-owner-v2-0-fd99079c5a04@linux.dev> <20260521-fix-fops-owner-v2-3-fd99079c5a04@linux.dev> <87fr2kf3m2.fsf@t14s.mail-host-address-is-not-set> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Alvin Sun In-Reply-To: <87fr2kf3m2.fsf@t14s.mail-host-address-is-not-set> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 6/18/26 20:13, Andreas Hindborg wrote: > Alvin Sun writes: > >> Add a `LocalModule` struct with a null-pointer `ModuleMetadata` impl >> in the doctest harness, so that `crate::LocalModule` (auto-inserted >> by `#[vtable]`) resolves correctly when there is no `module!` macro. >> >> Signed-off-by: Alvin Sun > Reviewed-by: Andreas Hindborg > > Does this need to be ordered before the vtable auto insert in the patch series? Yes, you're right — this patch would be better placed before the vtable auto-insert patch to avoid a temporary state where the doctest harness doesn't provide the LocalModule fallback that #[vtable] expects. Thanks for the suggestions from you and Gary. v3 has been sent to the list: https://lore.kernel.org/rust-for-linux/20260622-fix-fops-owner-v3-0-49d45cb37032@linux.dev Best regards, Alvin Sun > > Best regards, > Andreas Hindborg > >