Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp1424430rdh; Fri, 27 Oct 2023 14:01:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH/Cjnq8WSYQUrjypazbNyZV4Ne2aPIME/a4+yOJSOHXVWufpjxYUpKLi/iWiGB0yuvbhLl X-Received: by 2002:a25:2611:0:b0:da0:275a:25fb with SMTP id m17-20020a252611000000b00da0275a25fbmr7361444ybm.9.1698440507569; Fri, 27 Oct 2023 14:01:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698440507; cv=none; d=google.com; s=arc-20160816; b=TgB3BRwEVZy0TgQRYn35AWsdwf0uvAixoenwiEltjAXcJfLbeoWzUubXkLAIk5P1z1 9Uc6OdiEpiAIN1Dj2phu4b1WTyGIVKth/ls6Fz0kK35+URPY6W5SjKp/f2gMtxtF+49k oCeuvEFPXdC9HKpLxMDAKqlzutE2VJknF6NlX5JVtsZQbGAg3YrdqEF8PYwtluhszxBX qPtlH/ilfs2DQLyCjJSFdXlXHAPDzq8x9OeINN9soFU5z9+p9KieMW29l/WvPmmYcMnr FYj2LwrBN3d42elQTjufOb4WTTgCnol1eAdjZKJ26sXwGOUARDDrllVTWGNNv9d8SqvC P3fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:feedback-id:dkim-signature:dkim-signature; bh=rwlpdi8ev9gAGVqrnmvKN/9d4ygxlJDbgsArDSpR8bE=; fh=f3zEEhzbbbYBRyIAzh6EFgy1camJamz5jRLzC/nK/7Q=; b=V1rKDW744CGpat6tERmPozrD98TwYS8MHNMY3NKh+XJ0iIlt8dGC4JfVnT3yy8RaZX gGodW7lun85It8ca00/JqpD/6ov7wfRnEmSQM6ChK9/Bw//ygdKbu24AqjAEkG329/KQ IbZxkZ+gnSMM3QUg0hRTBddPBGI0nFDdsP/LcLqqzptv3JtSZ0Eg6Fu4cXAv0dvIzsVQ Q0XCxTuWU0z/YZ6ie3GIcR9BgsUvKUP8IGhFm+XTv+9OthIWxbQZrO3r/aO6XGox2zeC D6eAB0e5TG8Hxx0/+x5Cyemuhgaq1Nz9+hqsHOf2dvXPXnQGNBhEpulVAW2VOiL4VpsS TYpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ryhl.io header.s=fm3 header.b=p37XR05T; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=dhxyRlOT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ryhl.io Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id x185-20020a254ac2000000b00da0cbc393ccsi3585407yba.116.2023.10.27.14.01.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 14:01:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@ryhl.io header.s=fm3 header.b=p37XR05T; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=dhxyRlOT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ryhl.io Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 7DF4F801E5F0; Fri, 27 Oct 2023 14:01:44 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232617AbjJ0VBa (ORCPT + 99 others); Fri, 27 Oct 2023 17:01:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230451AbjJ0VB3 (ORCPT ); Fri, 27 Oct 2023 17:01:29 -0400 Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B46891AA; Fri, 27 Oct 2023 14:01:26 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id CDA005C00F7; Fri, 27 Oct 2023 17:01:25 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Fri, 27 Oct 2023 17:01:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ryhl.io; h=cc:cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1698440485; x=1698526885; bh=rwlpdi8ev9gAGVqrnmvKN/9d4ygxlJDbgsA rDSpR8bE=; b=p37XR05T/cTPb05b4k5TVgd4USs8jf3jzOAzTBItDgvhRKbf65X mHjcmMdceo3Rm/ZJS3we4Ybm+qHZFDqUlZe6f305SSQwiBk4C81lF8gosYKiWS1V d6iDAo6dxKl4i9zUqUv/RDL1fY32zpLygOgpNbkmTIuUyqwYqzJV//QfT9HVmjiE fMuCWvFkJW93voiqBE3VuKX01AaDw8ve9d3wMnWxZEKBz9Bac5Wk2T/9U1o9giTK fOoSq4UfWNCHFWTGp9PGARLUdZo7MpS/S/ErBLaCQ1WXjdAanb/Akzbv3ni/KbDh Uwsjna9Ow6HjXnoYpbwUyBmbzPK36ST3i6g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1698440485; x=1698526885; bh=rwlpdi8ev9gAGVqrnmvKN/9d4ygxlJDbgsA rDSpR8bE=; b=dhxyRlOT+TaTe5YjMLov24rW/w8DoXqo1maqGuKgWJry1Q7kxgP gi8nFBmXkEMKh12H9h1RXONt4rMz0VSofAT4FLHEf1wI1y7FHJ5Hv4La2nx5nBch AfO/VukR0z08mK+UDqWhKGsrIcOZpmd2tp7P/rv3OcukReEyDUhWbPIK4IgjBDsM fFmfIFoFFww8Nk5MgdlGGtpREwzhC9l8gWv1awVEzNuf6LRfLEJTfOm1IvmOS9LP V2na9r/IaD3tLoJcTZznYg1DXJDm1j/xkTrchB60usgQ71y5b0/yXvfE9AMmHiC5 wnVFUpIu2/q1M7hiv8GEaAo89BEoUwrJQLg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrleeggdduheeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeetlhhi tggvucfthihhlhcuoegrlhhitggvsehrhihhlhdrihhoqeenucggtffrrghtthgvrhhnpe efgfeugfdtgefhueeiudffjefhveeuheeuheekvdetfefgheehtdffuddtgfdujeenucev lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhitggvse hrhihhlhdrihho X-ME-Proxy: Feedback-ID: i56684263:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 27 Oct 2023 17:01:20 -0400 (EDT) Message-ID: <2999984f-56f1-4bb7-ba6d-0a74fbca7cbe@ryhl.io> Date: Fri, 27 Oct 2023 23:01:18 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3] rust: macros: improve `#[vtable]` documentation Content-Language: en-US-large To: Benno Lossin Cc: rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, Miguel Ojeda , Wedson Almeida Filho , Alex Gaynor , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Andreas Hindborg , Alice Ryhl , Martin Rodriguez Reboredo , Asahi Lina , Sven Van Asbroeck , Viktor Garske , Finn Behrens References: <20231026201855.1497680-1-benno.lossin@proton.me> From: Alice Ryhl In-Reply-To: <20231026201855.1497680-1-benno.lossin@proton.me> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Fri, 27 Oct 2023 14:01:44 -0700 (PDT) On 10/26/23 22:19, Benno Lossin wrote: > Traits marked with `#[vtable]` need to provide default implementations > for optional functions. The C side represents these with `NULL` in the > vtable, so the default functions are never actually called. We do not > want to replicate the default behavior from C in Rust, because that is > not maintainable. Therefore we should use `build_error` in those default > implementations. The error message for that is provided at > `kernel::error::VTABLE_DEFAULT_ERROR`. > > Signed-off-by: Benno Lossin Reviewed-by: Alice Ryhl