Re: [PATCH v3 1/1] rust: device: rename "Device::from_raw()"

From: Guilherme Giácomo Simões
Date: Mon Sep 30 2024 - 12:46:48 EST


Alice Ryhl <aliceryhl@xxxxxxxxxx> wrote:
>
> You can use one of my patches as an example. E.g.:
> https://lore.kernel.org/all/20240930-static-mutex-v4-1-c59555413127@xxxxxxxxxx/
>
> Here, the commit message itself has:
> 1. Motivation for why we should add global lock support. (To replace a
> hack I had to use in the Binder driver.)
> 2. Explanation for why I implemented it in a certain way. (Why
> separate initialization step?)
>
> Then, below the --- line and not part of the commit message, I have:
> 1. Information about which patches it depends on.
> 2. A changelog and links to previous versions.
>
> Anything below the --- line will not be part of the commit history
> when your change is merged. So you should think about what people
> would want to see when they look at your patch in the commit history.
> They care about why the change was made, and why it was implemented
> that way. What other things need to be merged first are not relevant
> to people who see the final version after it has been merged.
>
> Similarly, the changelog is important for reviewers so they can
> compare with the previous version, but for people who just see the
> final version, they don't care about which bugs you had in previous
> versions of the patch. Of course, if you change the implementation
> approach, then they might care about why you chose that approach over
> some other approach, but that explanation should be in the commit
> message (and the changelog should just say you changed the approach).
>
> Alice

This really make sense. I will resend a v4 version of this patch,
without 0/1.

Tanks for this Mrs. Ryhl.