Re: linux-next: manual merge of the pci tree with the pci-current tree

From: Lukas Wunner

Date: Tue Oct 13 2026 - 07:55:13 EST


On Tue, Oct 13, 2026 at 09:55:54AM +0200, Geert Uytterhoeven wrote:
> On Fri, 9 Oct 2026 at 21:36, Mark Brown <broonie@xxxxxxxxxx> wrote:
> > Today's linux-next merge of the pci tree got a conflict in:
> >
> > drivers/pci/pcie/aer.c
> >
> > between commit:
> >
> > 79c168e2aa957 ("PCI/AER: Skip error recovery on false alarms")
> >
> > from the pci-current tree and commit:
> >
> > d4c842c3af5bc ("PCI/AER: Fix memory leak in aer_recover_work_func() when pci_dev is missing")
> >
> > from the pci tree.
> >
> > I fixed it up (see below) and can carry the fix as necessary. This
> > is now fixed as far as linux-next is concerned, but any non trivial
> > conflicts should be mentioned to your upstream maintainer when your tree
> > is submitted for merging. You may also want to consider cooperating
> > with the maintainer of the conflicting tree to minimise any particularly
> > complex conflicts.
> >
> > diff --cc drivers/pci/pcie/aer.c
> > index 922a726a52a50,c376c3adbefd2..0000000000000
> > --- a/drivers/pci/pcie/aer.c
> > +++ b/drivers/pci/pcie/aer.c
> > @@@ -1393,15 -1383,15 +1391,21 @@@
> > ghes_estatus_pool_region_free((unsigned long)entry.regs,
> > sizeof(struct aer_capability_regs));
>
> While your resolution looks correct to me, it can be shortened
> by inserting
>
> if (!pdev)
> continue;
>
> here, avoiding the need for breaking long lines.

Actually the resolution I would have preferred is:

if (pdev && err) {
if (entry.severity == AER_NONFATAL)
pcie_do_recovery(pdev, pci_channel_io_normal,
aer_root_reset);
else if (entry.severity == AER_FATAL)
pcie_do_recovery(pdev, pci_channel_io_frozen,
aer_root_reset);
}
pci_dev_put(pdev);

I.e. change the if-condition to "if (pdev && err)" and keep the
pci_dev_put(pdev) outside the if-clause.

This was documented in my patch submission:

https://lore.kernel.org/r/0552ed277e40a288e0157af799257ee6ec722534.1791460615.git.lukas@xxxxxxxxx/

Thanks,

Lukas