Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp70257rdb; Tue, 31 Oct 2023 00:23:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFA98x/8aPBebUu1k5ScxOGB5T5g2Gr+PMkhkkG51mdhXfXozDOK/furJpyBpupq8Y+yovl X-Received: by 2002:a17:90b:111:b0:27c:fa10:fc82 with SMTP id p17-20020a17090b011100b0027cfa10fc82mr9396600pjz.28.1698737005307; Tue, 31 Oct 2023 00:23:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698737005; cv=none; d=google.com; s=arc-20160816; b=vvoA/+gBR25cDmJ1NUvbPy3b4JzIyU6AysdB40QhjkSjDDMnXVAuCpNMwirARqVgpW VShZ5hJXaT1FoInFlGqd5O9ygtFedgiDQQ/eWTmYJErH/bdZlapK8ATla/PNywS84NPB Fw7+iWzbk+oW/zc/tYbvV4X9A2Md4kvnI5x7pfVg1wGf4C0KjJA1VxtD8qnDZSQD2HUU S0UVuGc9EEkqyyKb+iOWgjfu9xwxmg18i5mIuu1equsUuqn+8n6Bil3K873Hsx1sMiXV CHIdpE+kg+5VHbfvFm+tcU5oZ4mh4c4Kr91nvtCulawZJf2tgVWFV6mcGC2n5A5wtrR6 E+mQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:cms-type:mime-version :content-transfer-encoding:content-language:accept-language :in-reply-to:message-id:date:thread-index:thread-topic:subject:cc:to :from:dkim-signature:dkim-filter; bh=1uYHkbsV5u2NBiN1eUWz+2QSJ2DT21D89y8Ixj1J8JY=; fh=VmnpyumFrBICQCYK+xT0TB9x7E3bkTABf6VVdEFUUCw=; b=Ljzb0PJ0kICXUpuWSy1HyQKakhGWmbdcw2wns4J1vUZur3K5L6NfcUsglkg418bEkI CRNWf/fS3peleyaRU6eDcJjSEQ5P+Mja5S0ZgMIA6KYJdDJJ+wMM99cwf9ELlbbLbdCy 6/vW7W/4eBDjUMIRZXBINXpLVdb8hHn1OrnIjno0Z8ypzxHof88P2H/oQhaKMY7NfxHN FD1PZ6wV+Ft4zyKAaZLjDddqHN2Steynu3QFuDlV4Kwqar7EU7QPQxaQTJQsMqSDL2YO Pr6DPpOtDY8N8fVclzyY4mqClyQm3Anvvao4wBxYPRx8bRKCk09RompA2Y+zEKHyMv7p oZKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=bhLyobmh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id i19-20020a17090ad35300b0026816382fdbsi580095pjx.40.2023.10.31.00.23.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 00:23:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=bhLyobmh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 13D4380C3AAA; Tue, 31 Oct 2023 00:23:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343610AbjJaHXJ (ORCPT + 99 others); Tue, 31 Oct 2023 03:23:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343606AbjJaHXI (ORCPT ); Tue, 31 Oct 2023 03:23:08 -0400 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A5008F for ; Tue, 31 Oct 2023 00:23:04 -0700 (PDT) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20231031072301euoutp0178f2e58ea6e3f78662a5e05252103768~TIEjOGfKf2914729147euoutp01y for ; Tue, 31 Oct 2023 07:23:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20231031072301euoutp0178f2e58ea6e3f78662a5e05252103768~TIEjOGfKf2914729147euoutp01y DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1698736981; bh=1uYHkbsV5u2NBiN1eUWz+2QSJ2DT21D89y8Ixj1J8JY=; h=From:To:CC:Subject:Date:In-Reply-To:References:From; b=bhLyobmh3q/adHjRwv2qZjJYXCSdGNtK3uJ4bNvhkQqXNpLU9wZ1hT277N8J4swaF 2CZ3LmKxhK3SdtBnkfF1CKTaAykKs8MzF9pzLl+Mir4beXpYai37VMsGnozJ1Eqx8A Jjd1I/i+fnAgR7RFZEyO+dMW/QfYDcRgHAkw8Eyo= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20231031072300eucas1p212a4998cf4db22ac68c2f39b07683b1f~TIEiu0Ymj0147101471eucas1p2W; Tue, 31 Oct 2023 07:23:00 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id A3.C4.11320.45BA0456; Tue, 31 Oct 2023 07:23:00 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20231031072300eucas1p282cad5700201f4c07f337c48675a0104~TIEiVi1ne1097410974eucas1p2p; Tue, 31 Oct 2023 07:23:00 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20231031072300eusmtrp1f7efdc55585041a959b862ccfe175585~TIEiU0OhT2895128951eusmtrp1h; Tue, 31 Oct 2023 07:23:00 +0000 (GMT) X-AuditID: cbfec7f4-97dff70000022c38-b2-6540ab547c78 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id B1.74.25043.45BA0456; Tue, 31 Oct 2023 07:23:00 +0000 (GMT) Received: from CAMSVWEXC02.scsc.local (unknown [106.1.227.72]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20231031072300eusmtip1fdd627821f6fab5a2b357d355447e011~TIEiGu-VW1818118181eusmtip1q; Tue, 31 Oct 2023 07:23:00 +0000 (GMT) Received: from CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) by CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 31 Oct 2023 07:22:59 +0000 Received: from CAMSVWEXC02.scsc.local ([::1]) by CAMSVWEXC02.scsc.local ([fe80::3c08:6c51:fa0a:6384%13]) with mapi id 15.00.1497.012; Tue, 31 Oct 2023 07:22:59 +0000 From: Andreas Hindborg To: Benno Lossin CC: Miguel Ojeda , Wedson Almeida Filho , Alex Gaynor , Boqun Feng , Gary Guo , =?iso-8859-1?Q?Bj=F6rn_Roy_Baron?= , 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" Subject: Re: [PATCH v3] rust: macros: improve `#[vtable]` documentation Thread-Topic: [PATCH v3] rust: macros: improve `#[vtable]` documentation Thread-Index: AQHaCEn51y1znPu5g0OLkL6vmknml7BjhYSA Date: Tue, 31 Oct 2023 07:22:59 +0000 Message-ID: <87bkcf6yst.fsf@samsung.com> In-Reply-To: <20231026201855.1497680-1-benno.lossin@proton.me> Accept-Language: en-US, en-GB Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [106.110.32.64] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrEKsWRmVeSWpSXmKPExsWy7djPc7ohqx1SDXZcN7f4O3s7u8WJ600s Fh+uNbFa3Liwn9lizZZGJouLZ14zWuzrPs5qcXnXHDaLvesvs1msnL+c0WL9s8PMFg9v32Sx mNcJ1Lth2VpGiyst7awO/B6f5j1n8ljS+YvJY+esu+weCzaVemxa1cnmMa9zHpPH9/Y9bB49 bZuYPE5tmsvu8XmTXABXFJdNSmpOZllqkb5dAlfGinmXmQsaWSvOrfzD3sA4m6WLkZNDQsBE YsOJu+xdjFwcQgIrGCV+P93IBuF8YZR4s2E3C4TzmVHi+utNcC3fJ79jhUgsZ5S4fOUqE1zV 3X9XoPrPMEp8WvSCGaRFSGAlo8TpK1kgNpuAvsS1NdfA4iICmhJ37/0H62YWeMIisWf+OTaQ hLCAu8TBRzcZIYo8JD5tfgNlG0n0rHoIdAcHB4uAqsT5gwIgYV4BDYmrsz6wgticAnYSH579 YwexGQVkJR6t/AVmMwuIS9x6Mp8J4gVBiUWz9zBD2GIS/3Y9ZIOwdSTOXn/CCGEbSGxdug/q ZUWJaz0Q5zAL6EncmDqFDcLWlli28DUzxA2CEidnPgGHl4TAUi6JCbcnsEI0u0hcmP8VapCw xKvjW9ghbBmJ05N7WCYwas9Cct8sJDtmIdkxC8mOBYwsqxjFU0uLc9NTi43yUsv1ihNzi0vz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W/wGxmAXGJW0/mM0G8 ICCxZM95ZghbVOLl439Qr+lInL3+BOplA4mtS/dBw0VR4loPxG3MAnoSN6ZOYYOwtSWWLXzN DHGQoMTJmU9YJjBKz0KybhaSlllIWmYhaVnAyLKKUSS1tDg3PbfYSK84Mbe4NC9dLzk/dxMj MKFtO/Zzyw7Gla8+6h1iZOJgPMQowcGsJMJ72NQhVYg3JbGyKrUoP76oNCe1+BCjKTCMJjJL iSbnA1NqXkm8oZmBqaGJmaWBqaWZsZI4r2dBR6KQQHpiSWp2ampBahFMHxMHp1QDE2dJ+4aF xwQONK6as+VG63vnnbNnLr5yP1JJqmwtQ6Hh5sKNTj7tZ+6Kn+HZaloo65l3PPKVUq4Xm1Ub g/HxdZK82auUeL8Zvi/KypzsoD/NT3XW50Vr3kVaXX9mMNnX5O56fc/tsy/oXX3eLqHRduHb 0Z0TWueV65ns2dVlwb6e22CbuRWb0PySVCPj2dFc0s4afCvvbmH0LKtce2X1c7/1s1asV5v7 nf/T4x88sz88Oij5c8lJ/SsCqrHOkxe93H7e3qcnpOmLys077ExOspOiNuVHLaw0Y9Sv/z/7 bHyIhaPV1wU/5y1gnjr73T2PnNNfdilpLq1SWhAcJPL/2HNXHrP6plJz1WrZ+TI3nZVYijMS DbWYi4oTAT7RjqjxAwAA X-CMS-MailID: 20231031072300eucas1p282cad5700201f4c07f337c48675a0104 X-Msg-Generator: CA X-RootMTR: 20231026201959eucas1p171cfdadceae0ee703af26fa1ae6140a9 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20231026201959eucas1p171cfdadceae0ee703af26fa1ae6140a9 References: <20231026201855.1497680-1-benno.lossin@proton.me> X-Spam-Status: No, score=-1.3 required=5.0 tests=DKIMWL_WL_HIGH,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 fry.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 (fry.vger.email [0.0.0.0]); Tue, 31 Oct 2023 00:23:19 -0700 (PDT) Benno Lossin writes: > 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: Andreas Hindborg