Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5514680rdb; Wed, 13 Dec 2023 10:45:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IEpz8N7AQBiX3YE3ScA2moKc6zZQZhgMARTe74gOkJD5xiH/yS/TRtNG49Ypbghej1zyuAf X-Received: by 2002:a17:902:e789:b0:1d0:b340:43a5 with SMTP id cp9-20020a170902e78900b001d0b34043a5mr4990738plb.89.1702493141433; Wed, 13 Dec 2023 10:45:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702493141; cv=none; d=google.com; s=arc-20160816; b=GVIGG8s9RjdoMR8fFbqVjp83f9lFRNTxIioDkBSKCDDrXouy0Hkcycy7SI6MhsVFUm LujaJ6s2Y488mgGR82iKCHZMyVnkpjI2cpppcGvCy3ijw1MS2H7hiX6EBh5BAf7tFa8s V20FjXEyh5DahtnbGOr1s3JjdV86Rv2NgE7+cNWUY9O2b7E+1jKhJEjQjtucthYHp3CL i/ZW+oXFGc7co7fcw8iUkcAZ1V08hyndQPPuD4EgUkGQOkibkcyld5qJ/1UqGPlq2wM8 +xPuUDvwyjqYCjWqYq5TcMdx9AvqRJxq3SPD4XhIhYepuqUBOmE1temzIcaI4ByV/poO UgFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=GdwPGSTIX5rNBaIrl1/3GcKjIpCybVlITHwJ+mspW+o=; fh=+EPrbX0lHNSQlPCHfxj+ZFBRtee/xUX2AfDZTD5wNEA=; b=XZkw9wMFsvEN4gl0PbOXDpM1dML06TgKOjrqd9ZUZmutBjn5a8+JRN/PyLnPg14E4G QjtRCjmWaaK1pBFEPSGC6KlblpCtz5671qL4sk5c1hHzOMFfnR+dsTgsPXCcPqvp5Uzb R/FeE1ljweVnu0/YXVzZw4VQbtYjVCKnL30kuzYr8NB8bERgJPD7K9ucD//FvQ17ToFz haCLk/McQ1dsSBNK0pIPMUrRwUcQIMuo3dbC9GAMXtL1CWqnVZQa/o+RFpD6WEXdu2AB OEEEWrv/HzI9p8lH32IYiWpGHl1VfFBKlzr+/7Diq7aJqHjMDddZSCFMDq4jJtE87Zw/ Jxlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=EcBynjMh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id j4-20020a170902da8400b001cfbd3f38c6si9907856plx.302.2023.12.13.10.45.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 10:45:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=EcBynjMh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id DCA8680A9148; Wed, 13 Dec 2023 10:45:03 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233651AbjLMSou (ORCPT + 99 others); Wed, 13 Dec 2023 13:44:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229480AbjLMSos (ORCPT ); Wed, 13 Dec 2023 13:44:48 -0500 Received: from mail-yb1-xb33.google.com (mail-yb1-xb33.google.com [IPv6:2607:f8b0:4864:20::b33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43F99BD; Wed, 13 Dec 2023 10:44:55 -0800 (PST) Received: by mail-yb1-xb33.google.com with SMTP id 3f1490d57ef6-dbcde128abeso336429276.0; Wed, 13 Dec 2023 10:44:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702493094; x=1703097894; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=GdwPGSTIX5rNBaIrl1/3GcKjIpCybVlITHwJ+mspW+o=; b=EcBynjMhbJlplDV8GVD3TVxBpBB2UmvDCNblL3rzFjo5krk9Z/BNeO0wLFVOikhE5w bf88QxyV+fHbyRotcJsisE3iW3zJCKG6wVcdjfu/JFa6Td5s48e4CubLJy7qUFPb2S8z btPo6HDMkLJm3frnp6c2NPayiYzTSciNvJAPFIKV3yNWPAJQH1m6/5XzJo2QQV4jmdGZ 2mQlyry4jnaj6+MJp8cxsfnWl+xLaClGycAaY/vv4TcSnAoD2SNKyVuk/AZ/jSQ5r3v5 TH9Tt6mmE12yvMLutJi0dQxV9yBO+06nMWFktqWKfgz3tacOdFQFJOq3OVE6RlsEmjyj OvWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702493094; x=1703097894; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GdwPGSTIX5rNBaIrl1/3GcKjIpCybVlITHwJ+mspW+o=; b=EKwdrDjOTHvyahcxRxL5NnH1kn9zMYc2ioeXzIBtH+u3UiRi3A8RWbawe+BKx4zDa3 u7SbuLfv2qhcCEqn5oDPx66vbhVe7d1Q7y4BLuC1+LqxmxDvx56KfGG6GxxkUzzgjC+e NRdmTimS2JXduoZ8ZQWXWIZMGOl7HKlZgzGhHvP+ESeD0unkOs/G7wEjL5FJMhM09LLt 7WlB2xei457x/5XmyTPfVgmvsge7cUL2it8kXKPeFuRZ5JbDAeN4UVAmDsv2lvcnYOug PWndR+i1NUVV4rO4t7k/DUuDNxYFjdRZZbAPgwSOufd/CoFy7ItT3YjOGFD00Xqt6qkV EVIQ== X-Gm-Message-State: AOJu0YwdMXyv9wt2jlWBtoj/BGdOJxxjeK3rIf488JmKq08mAxKGux3P fODRmHV2kSknErNMGevHxdlH7l21kbJs4VFXPrc= X-Received: by 2002:a25:2905:0:b0:dbc:66c0:574c with SMTP id p5-20020a252905000000b00dbc66c0574cmr5370192ybp.127.1702493094496; Wed, 13 Dec 2023 10:44:54 -0800 (PST) MIME-Version: 1.0 References: <20231026201855.1497680-1-benno.lossin@proton.me> In-Reply-To: <20231026201855.1497680-1-benno.lossin@proton.me> From: Miguel Ojeda Date: Wed, 13 Dec 2023 19:44:43 +0100 Message-ID: Subject: Re: [PATCH v3] rust: macros: improve `#[vtable]` documentation To: Benno Lossin Cc: 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 , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Wed, 13 Dec 2023 10:45:05 -0800 (PST) On Thu, Oct 26, 2023 at 10:20=E2=80=AFPM 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 Applied to `rust-next` (with the requested wrapping applied and capitalized sentence). Thanks everyone! Cheers, Miguel