[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 13/13] Remove devres from pci_intx()
- To: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
- From: Philipp Stanner <pstanner@xxxxxxxxxx>
- Date: Thu, 10 Oct 2024 11:11:36 +0200
- Cc: Damien Le Moal <dlemoal@xxxxxxxxxx>, Niklas Cassel <cassel@xxxxxxxxxx>, Sergey Shtylyov <s.shtylyov@xxxxxx>, Basavaraj Natikar <basavaraj.natikar@xxxxxxx>, Jiri Kosina <jikos@xxxxxxxxxx>, Benjamin Tissoires <bentiss@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, Alex Dubov <oakad@xxxxxxxxx>, Sudarsana Kalluru <skalluru@xxxxxxxxxxx>, Manish Chopra <manishc@xxxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, Eric Dumazet <edumazet@xxxxxxxxxx>, Jakub Kicinski <kuba@xxxxxxxxxx>, Paolo Abeni <pabeni@xxxxxxxxxx>, Rasesh Mody <rmody@xxxxxxxxxxx>, GR-Linux-NIC-Dev@xxxxxxxxxxx, Igor Mitsyanko <imitsyanko@xxxxxxxxxxxxx>, Sergey Matyukevich <geomatsi@xxxxxxxxx>, Kalle Valo <kvalo@xxxxxxxxxx>, Sanjay R Mehta <sanju.mehta@xxxxxxx>, Shyam Sundar S K <Shyam-sundar.S-k@xxxxxxx>, Jon Mason <jdmason@xxxxxxxx>, Dave Jiang <dave.jiang@xxxxxxxxx>, Allen Hubbe <allenbh@xxxxxxxxx>, Bjorn Helgaas <bhelgaas@xxxxxxxxxx>, Alex Williamson <alex.williamson@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, Jaroslav Kysela <perex@xxxxxxxx>, Takashi Iwai <tiwai@xxxxxxxx>, Mario Limonciello <mario.limonciello@xxxxxxx>, Chen Ni <nichen@xxxxxxxxxxx>, Ricky Wu <ricky_wu@xxxxxxxxxxx>, Al Viro <viro@xxxxxxxxxxxxxxxxxx>, Breno Leitao <leitao@xxxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>, Mostafa Saleh <smostafa@xxxxxxxxxx>, Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>, Hannes Reinecke <hare@xxxxxxx>, John Garry <john.g.garry@xxxxxxxxxx>, Soumya Negi <soumya.negi97@xxxxxxxxx>, Jason Gunthorpe <jgg@xxxxxxxx>, Yi Liu <yi.l.liu@xxxxxxxxx>, "Dr. David Alan Gilbert" <linux@xxxxxxxxxxx>, Christian Brauner <brauner@xxxxxxxxxx>, Ankit Agrawal <ankita@xxxxxxxxxx>, Reinette Chatre <reinette.chatre@xxxxxxxxx>, Eric Auger <eric.auger@xxxxxxxxxx>, Ye Bin <yebin10@xxxxxxxxxx>, Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>, Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxx>, Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>, Kai Vehmanen <kai.vehmanen@xxxxxxxxxxxxxxx>, Peter Ujfalusi <peter.ujfalusi@xxxxxxxxxxxxxxx>, Rui Salvaterra <rsalvaterra@xxxxxxxxx>, Marc Zyngier <maz@xxxxxxxxxx>, linux-ide@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-input@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, linux-wireless@xxxxxxxxxxxxxxx, ntb@xxxxxxxxxxxxxxx, linux-pci@xxxxxxxxxxxxxxx, linux-staging@xxxxxxxxxxxxxxx, kvm@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-sound@xxxxxxxxxxxxxxx
- Delivery-date: Thu, 10 Oct 2024 09:11:56 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Thu, 2024-10-10 at 11:50 +0300, Dan Carpenter wrote:
> On Wed, Oct 09, 2024 at 10:35:19AM +0200, Philipp Stanner wrote:
> > pci_intx() is a hybrid function which can sometimes be managed
> > through
> > devres. This hybrid nature is undesirable.
> >
> > Since all users of pci_intx() have by now been ported either to
> > always-managed pcim_intx() or never-managed pci_intx_unmanaged(),
> > the
> > devres functionality can be removed from pci_intx().
> >
> > Consequently, pci_intx_unmanaged() is now redundant, because
> > pci_intx()
> > itself is now unmanaged.
> >
> > Remove the devres functionality from pci_intx(). Remove
> > pci_intx_unmanaged().
> > Have all users of pci_intx_unmanaged() call pci_intx().
> >
> > Signed-off-by: Philipp Stanner <pstanner@xxxxxxxxxx>
>
> I don't like when we change a function like this but it still
> compiles fine.
> If someone is working on a driver and hasn't pushed it yet, then it's
> probably
> supposed to be using the new pcim_intx() but they won't discover that
> until they
> detect the leaks at runtime.
There wouldn't be any *leaks*, it's just that the INTx state would not
automatically be restored. BTW the official documentation in its
current state does not hint at pci_intx() doing anything automatically,
but rather actively marks it as deprecated.
But you are right that a hypothetical new driver and OOT drivers could
experience bugs through this change.
>
> Why not leave the pci_intx_unmanaged() name. It's ugly and that will
> discorage
> people from introducing new uses.
I'd be OK with that. Then we'd have to remove pci_intx() as it has new
users anymore.
Either way should be fine and keep the behavior for existing drivers
identical.
I think Bjorn should express a preference
P.
>
> regards,
> dan carpenter
>
|