Skip to contentSkip to conversation

Suggestion for b4 prep: new flag to collect email addresses on a per patch basis

DISCUSSION Brian Masney 2 participants 2 messages Aug 27, 2025 – Sep 2, 2025

lore
Share & tools
lore
#0 lore raw

Hi,

I recently had to send out this 114 patch series that covers changes to drivers/clk to migrate away from a deprecated API:

https://lore.kernel.org/linux-clk/[email protected]/

40 of these clk drivers have entry in the MAINTAINERS file, so 'b4 prep --auto-to-cc' adds everyone to the To line for the whole series. Most people only have 1 or 2 drivers that's relevant to them in the big series, so it creates a lot of noise for people.

For big series like this, what do you think about adding an option to 'b4 prep' to have it only put someone on the To line for the patch(es) of interest? So for example, let's say we have two patches that make changes to drivers/clk/driver1.c and drivers/clk/driver2.c.

- [PATCH 0/2] clk: some changes # Sent out to everyone. Union of all

                                 # email addresses below.
- [PATCH 1/2] clk: driver1:      # Only sent to driver1 maintainers
- [PATCH 2/2] clk: driver2:      # Only sent to driver2 maintainers

I could have sent out maybe 80 ish or so small patch series, but there's downsides to that as well for the maintainer.

Brian

#1 lore raw

Hi,

Quoted 17 lines · Brian Masney

Hi,

I recently had to send out this 114 patch series that covers changes to drivers/clk to migrate away from a deprecated API:

https://lore.kernel.org/linux-clk/[email protected]/

40 of these clk drivers have entry in the MAINTAINERS file, so 'b4 prep --auto-to-cc' adds everyone to the To line for the whole series. Most people only have 1 or 2 drivers that's relevant to them in the big series, so it creates a lot of noise for people.

For big series like this, what do you think about adding an option to 'b4 prep' to have it only put someone on the To line for the patch(es) of interest? So for example, let's say we have two patches that make changes to drivers/clk/driver1.c and drivers/clk/driver2.c.

Quoted 7 lines

- [PATCH 0/2] clk: some changes # Sent out to everyone. Union of all

                                 # email addresses below.
- [PATCH 1/2] clk: driver1:      # Only sent to driver1 maintainers
- [PATCH 2/2] clk: driver2:      # Only sent to driver2 maintainers

I could have sent out maybe 80 ish or so small patch series, but there's downsides to that as well for the maintainer.

I had to do a similar thing today, and ended up doing:

git rebase $BASE -i --exec 'git commit --no-edit --amend -F <(git show --no-patch --format=%B HEAD && echo "---" && git show HEAD | ./scripts/get_maintainer.pl --nogit --nogit-fallback --norolestats --nol --nor | while read -r line; do echo "To: $line"; done && git show HEAD | ./scripts/get_maintainer.pl --nogit --nogit-fallback --norolestats --nom | while read -r line; do echo "Cc: $line"; done)'

It's quite a mouthful, but it added the list of recipients for each patch after --- based on what get_maintainer retrieves.

Once that's done, b4 properly picks up on it.

Maxime