Skip to contentSkip to conversation

linux-next: duplicate patches in the sophgo tree

DISCUSSION Stephen Rothwell 3 participants 6 messages Sep 6, 2024 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi all,

The following commits are also in the arm-soc tree as different commits (but the same patches):

0014d11186f5 ("riscv: dts: sophgo: Add sdhci0 configuration for Huashan Pi") 161477baee0f ("riscv: dts: sophgo: Add i2c device support for sg2042") 33ae4c56cacf ("riscv: sophgo: dts: add mmc controllers for SG2042 SoC") 47e5a8daf0b9 ("dt-bindings: riscv: Add Sipeed LicheeRV Nano board compatibles
")
4f8fb973389d ("riscv: sophgo: dts: add gpio controllers for SG2042 SoC") 7f3cf53e4c65 ("riscv: dts: sophgo: Use common "interrupt-parent" for all peri
pherals for sg2042")
c0a4490b120f ("riscv: dts: sophgo: cv18xx: add DMA controller") e8b4716e68ba ("riscv: dts: sophgo: Add mcu device for Milk-V Pioneer") f9cc479ddc8c ("dt-bindings: interrupt-controller: Add SOPHGO SG2002 plic")

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw

Hi,Stephen,

The arm-soc tree contains these patches is due to I submited a PR to Arnd and he merged this today.

And for the sophgo/for-next branch, it does contains these patches. I created the PR branch(sophgo/riscv-sophgo-dt-for-next) and cherry-picked these patches from sophgo/for-next and submited the PR. I see the commits in arm-soc are the same as that from sophgo/riscv-sophgo-dt-for-next, but they are different against the commit ids from sophgo/for-next due to cherry-pick operation.

So my question is, do we need to make sure commit id the same between PR branch and sophgo/for-next branch?

Thanks,

Chen

Quoted 17 lines · Stephen Rothwell

Hi all,

The following commits are also in the arm-soc tree as different commits (but the same patches):

0014d11186f5 ("riscv: dts: sophgo: Add sdhci0 configuration for Huashan Pi") 161477baee0f ("riscv: dts: sophgo: Add i2c device support for sg2042") 33ae4c56cacf ("riscv: sophgo: dts: add mmc controllers for SG2042 SoC") 47e5a8daf0b9 ("dt-bindings: riscv: Add Sipeed LicheeRV Nano board compatibles
")
4f8fb973389d ("riscv: sophgo: dts: add gpio controllers for SG2042 SoC") 7f3cf53e4c65 ("riscv: dts: sophgo: Use common "interrupt-parent" for all peri
pherals for sg2042")
c0a4490b120f ("riscv: dts: sophgo: cv18xx: add DMA controller") e8b4716e68ba ("riscv: dts: sophgo: Add mcu device for Milk-V Pioneer") f9cc479ddc8c ("dt-bindings: interrupt-controller: Add SOPHGO SG2002 plic")

#2 lore raw

Hi Chen,

Quoted 11 lines · On Fri, 6 Sep 2024 11:24:14 +0800 Chen Wang <[email protected]> wrote:

The arm-soc tree contains these patches is due to I submited a PR to Arnd and he merged this today.

And for the sophgo/for-next branch, it does contains these patches. I created the PR branch(sophgo/riscv-sophgo-dt-for-next) and cherry-picked these patches from sophgo/for-next and submited the PR. I see the commits in arm-soc are the same as that from sophgo/riscv-sophgo-dt-for-next, but they are different against the commit ids from sophgo/for-next due to cherry-pick operation.

Quoted 2 lines

So my question is, do we need to make sure commit id the same between PR branch and sophgo/for-next branch?

If you are submitting everything that is in the for-next branch, you should just submit that branch as is, that way you have submitted what has been tested and all the commit id's will not change.

However, if you are submitting a subset, you should probably create a branch with that subset (as you did) and then rebase the for-next branch on top of that and then test the result yourself and then let it it in linux-next for a day or 2 (to check for any new conflicts - there should be none). After that, you should submit the subset branch to arm-soc. This way (again) you have submitted what has been tested and all the commit id's will not change.

Right now, you should rebase your for-next branch onto your riscv-sophgo-dt-for-next branch so that the duplicate patches are removed (they will be the same commits in both trees).

Signature · 2 lines
Cheers,
Stephen Rothwell
#3 lore raw
Quoted 27 lines · Stephen Rothwell

Hi Chen,

Quoted 10 lines · On Fri, 6 Sep 2024 11:24:14 +0800 Chen Wang <[email protected]> wrote:

The arm-soc tree contains these patches is due to I submited a PR to Arnd and he merged this today.

And for the sophgo/for-next branch, it does contains these patches. I created the PR branch(sophgo/riscv-sophgo-dt-for-next) and cherry-picked these patches from sophgo/for-next and submited the PR. I see the commits in arm-soc are the same as that from sophgo/riscv-sophgo-dt-for-next, but they are different against the commit ids from sophgo/for-next due to cherry-pick operation.

Quoted 2 lines

So my question is, do we need to make sure commit id the same between PR branch and sophgo/for-next branch?

If you are submitting everything that is in the for-next branch, you should just submit that branch as is, that way you have submitted what has been tested and all the commit id's will not change.

However, if you are submitting a subset, you should probably create a branch with that subset (as you did) and then rebase the for-next branch on top of that and then test the result yourself and then let it it in linux-next for a day or 2 (to check for any new conflicts - there should be none). After that, you should submit the subset branch to arm-soc. This way (again) you have submitted what has been tested and all the commit id's will not change.

Quoted 3 lines

Right now, you should rebase your for-next branch onto your riscv-sophgo-dt-for-next branch so that the duplicate patches are removed (they will be the same commits in both trees).

Thanks, Stephen. I have updated the sophgo/for-next.

Regards,

Chen

#4 lore raw
In reply to Chen Wang
Quoted 12 lines · Chen Wang

Hi,Stephen,

The arm-soc tree contains these patches is due to I submited a PR to Arnd and he merged this today.

And for the sophgo/for-next branch, it does contains these patches. I created the PR branch(sophgo/riscv-sophgo-dt-for-next) and cherry-picked these patches from sophgo/for-next and submited the PR. I see the commits in arm-soc are the same as that from sophgo/riscv-sophgo-dt-for-next, but they are different against the commit ids from sophgo/for-next due to cherry-pick operation.

Quoted 2 lines

So my question is, do we need to make sure commit id the same between PR branch and sophgo/for-next branch?

It certainly makes things easier for everyone if you have the same commit IDs, yes. Aside from tripping Stephen's sanity checks, having rebased commits in your tree also means that the branch that gets tested is different from the one that gets merged.

If you have multiple branches that you want to be in linux-next but get merged through different upstream trees, your for-next branch would normally just be a merge of those rather than a cherry-pick.

[Side note: you should also ensure that each of those branches individually works correctly, i.e. it may add features that only work when combined with the other branches, but it never introduces regressions when merged without the other ones.]

Arnd

#5 lore raw
Quoted 24 lines · Arnd Bergmann
Quoted 12 lines · Chen Wang

Hi,Stephen,

The arm-soc tree contains these patches is due to I submited a PR to Arnd and he merged this today.

And for the sophgo/for-next branch, it does contains these patches. I created the PR branch(sophgo/riscv-sophgo-dt-for-next) and cherry-picked these patches from sophgo/for-next and submited the PR. I see the commits in arm-soc are the same as that from sophgo/riscv-sophgo-dt-for-next, but they are different against the commit ids from sophgo/for-next due to cherry-pick operation.

Quoted 2 lines

So my question is, do we need to make sure commit id the same between PR branch and sophgo/for-next branch?

It certainly makes things easier for everyone if you have the same commit IDs, yes. Aside from tripping Stephen's sanity checks, having rebased commits in your tree also means that the branch that gets tested is different from the one that gets merged.

If you have multiple branches that you want to be in linux-next but get merged through different upstream trees, your for-next branch would normally just be a merge of those rather than a cherry-pick.

Quoted 6 lines

[Side note: you should also ensure that each of those branches individually works correctly, i.e. it may add features that only work when combined with the other branches, but it never introduces regressions when merged without the other ones.]

Arnd

Thank you Arnd for your careful explaination. I will pay attention to these issues later.

Regards,

Chen