Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp1917126rdh; Sat, 25 Nov 2023 07:10:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IHw+gro2J1ufSKJfSfEIQx8OBQsd7aYFovt4Rr2N6o0HaSrebw1BQXHMB8NgYkwVKVYzQYw X-Received: by 2002:a05:6a00:2791:b0:6c4:cf33:cbe8 with SMTP id bd17-20020a056a00279100b006c4cf33cbe8mr6140178pfb.6.1700925053070; Sat, 25 Nov 2023 07:10:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700925053; cv=none; d=google.com; s=arc-20160816; b=V/tzN3Ex9WRx8I0GTz9S8p8W4/cZutFMqsIwYzGrp9NvSXHqWWicJ0kwAVNm3cHWXm +UUPe7FuZcRfJqYSKLf4cXdlWT0cB9tMuskFOKJJy/cMmwHdeOfaSbedvsZ9gqY9ODB6 u8Usb5gHfFF+TLpCIybWrojNCCVKpR0O0RR4UvjPT8qSkbaL/9dpm1ykizRv3xtlyjGs IymmG1x7d02BFDBDsiLApifUnO3DmNQDjIwdwboYKIY0HO/HcdjFKVmXdfhA+oHFGh1H dc22NlMDQ9CX262XbWPg1a0mtWVjLn7rKwJAKVowdn+w3eNjpghUx8lmsKqaX+jBsMkQ iTKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=b6nra9Lcv4J0p7Mtm3VDZdQLHIIKFmAQbN88E+3pcRM=; fh=liO4paFD1RF0JUzvyhY110VaZRw0lg70UxCfITmuhZ8=; b=Bh/7bDvtNsYt1Cqk0LJTU5OM0S0zK915ZCur26xLRfdl71XhLXHUggb1M1k7BbokKd fqsyB7C1digRMnjJ1IWwd/lC0uOFkceb/8iXtOkkKm8B2nF/wl2tVExvCG33nJqWT76z z/0PZkQOJ93Gv4GSPSzTUQIiwGksGJsSJicuU2YvQ/0LWpm2x0mshbGJvfGaqiSpOtlB UyWHbPV32Fo+wAUGsP++3Trao5PZPRxkYibeCP2tBTywdlnr9p+se3/LEM3knYOe2l6u AqzKhbBq9572nd9JdHK5sU/bHB3REJs/TV+8kBkSBSrMJ+diARA3UAg8S9O0WXx7OVIk SbbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Z3uJ3Mfd; 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=linuxfoundation.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id o10-20020a056a0015ca00b006cb65cfde7fsi6146914pfu.91.2023.11.25.07.10.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Nov 2023 07:10:53 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=Z3uJ3Mfd; 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=linuxfoundation.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 263F780D1DCA; Sat, 25 Nov 2023 07:10:50 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232139AbjKYPKe (ORCPT + 99 others); Sat, 25 Nov 2023 10:10:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232047AbjKYPKd (ORCPT ); Sat, 25 Nov 2023 10:10:33 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B6B2FF for ; Sat, 25 Nov 2023 07:10:40 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 441A3C433C8; Sat, 25 Nov 2023 15:10:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1700925039; bh=FlMufzO053ZuJAQw/jq0Rz/Fa4Pj3XjQjS1W/sgM/ho=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Z3uJ3Mfdj4/jbleZ6R9YAwVbDGrKkoBTnctw/nCVyE2a13FUqaDD3AEWvVZHE5nsl gV0dzsN9pRkXTDin54Zbo0Cuqe8RLvqf9yOipfJ5BMTdNRlipnXVQDhkLruLTIf/Ev D2LGYPWN0MN24TPXHgc852V5wZ+no1lqUOPSjUGg= Date: Sat, 25 Nov 2023 15:10:36 +0000 From: Greg KH To: Benno Lossin Cc: Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Andreas Hindborg , Alice Ryhl , Martin Rodriguez Reboredo , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] rust: macros: allow generic parameter default values in `#[pin_data]` Message-ID: <2023112514-laziness-valium-7a25@gregkh> References: <20231125125024.1235933-1-benno.lossin@proton.me> <20231125125024.1235933-2-benno.lossin@proton.me> <2023112525-impatient-untwist-ee3d@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.9 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,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 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]); Sat, 25 Nov 2023 07:10:50 -0800 (PST) On Sat, Nov 25, 2023 at 03:02:00PM +0000, Benno Lossin wrote: > On 25.11.23 15:26, Greg KH wrote: > > On Sat, Nov 25, 2023 at 12:51:09PM +0000, Benno Lossin wrote: > >> This patch adds compatibilty for generic parameters defaults by using > >> the newly introduced `decl_generics` instead of the `impl_generics`. > > > > This says _what_ is happening here, but not _why_ this is needed at all. > > > > Try taking a look a the kernel documentation for how to write a good > > changelog text to make this much better. It's often times the most > > difficult portion of making a kernel patch, the code is easy, writing a > > summary of why everyone else should agree that this code is acceptable > > is hard. > > The reason is hidden in the third patch. Please do not hide things, patches need to be stand-alone and understandable that way, otherwise they will be rejected as no one can understand why they would be needed. > Without this, the `#[pin_data] > macro would not allow specifying const generic parameter default values > and instead emit a compile error. That's nice, but it still doesn't tell me _why_ this is needed. Why would I want any generic paramter default values at all? Who needs any of this? What will it be used for? What does it actually do? thanks, greg k-h