Re: [PATCH 2/3] rust: macros: allow generic parameter default values in `#[pin_data]`

From: Greg KH
Date: Sat Nov 25 2023 - 10:10:44 EST


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