[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 01/11] PCI: Prepare removing devres from pci_intx()
- To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Damien Le Moal <dlemoal@xxxxxxxxxx>, Niklas Cassel <cassel@xxxxxxxxxx>, 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>, Andrew Lunn <andrew+netdev@xxxxxxx>, "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>, 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>, Mostafa Saleh <smostafa@xxxxxxxxxx>, Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>, Jason Gunthorpe <jgg@xxxxxxxx>, Yi Liu <yi.l.liu@xxxxxxxxx>, Kunwu Chan <chentao@xxxxxxxxxx>, Ankit Agrawal <ankita@xxxxxxxxxx>, Christian Brauner <brauner@xxxxxxxxxx>, Reinette Chatre <reinette.chatre@xxxxxxxxx>, Eric Auger <eric.auger@xxxxxxxxxx>, Ye Bin <yebin10@xxxxxxxxxx>
- From: Philipp Stanner <pstanner@xxxxxxxxxx>
- Date: Wed, 13 Nov 2024 17:11:29 +0100
- Cc: linux-ide@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-input@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, linux-wireless@xxxxxxxxxxxxxxx, ntb@xxxxxxxxxxxxxxx, linux-pci@xxxxxxxxxxxxxxx, kvm@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Wed, 13 Nov 2024 16:11:59 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Wed, 2024-11-13 at 17:04 +0100, Thomas Gleixner wrote:
> On Wed, Nov 13 2024 at 13:41, Philipp Stanner wrote:
> > +/**
> > + * pci_intx_unmanaged - enables/disables PCI INTx for device dev,
> > + * unmanaged version
> > + * @pdev: the PCI device to operate on
> > + * @enable: boolean: whether to enable or disable PCI INTx
>
> Except that the argument is of type int, which really should be type
> bool.
True, but this is a *temporary* copy of pci_intx(), a ~16 year old
function. Older C programmers had the habit of for some reason using
32-bit integers for a true/false boolean all the time.
We _could_ think of changing pci_intx()'s parameter to a boolean, but I
think it wouldn't really improve things very much
see also below
>
> > + * Enables/disables PCI INTx for device @pdev
> > + *
> > + * This function behavios identically to pci_intx(), but is never
> > managed with
> > + * devres.
>
> behavios?
-> behaves. Will fix.
>
> > + */
> > +void pci_intx_unmanaged(struct pci_dev *pdev, int enable)
>
> I find this function name mildy confusing. This _unmanaged suffix is
> not
> really telling me anything. And the reference that this behaves
> identically to pci_intx() makes it even worse.
>
> This function is about controlling the PCI INTX_DISABLE bit in the
> PCI_COMMAND config word, right?
>
> So naming it pci_intx_control() would make it entirely clear what
> this
> is about, no?
We had this conversation last week. I answered on that already, maybe
you have overlooked it:
https://lore.kernel.org/all/a8d9f32f60f55c58d79943c4409b8b94535ff853.camel@xxxxxxxxxx/
Please also take a look at patch 11, then you'll see the full picture
Danke,
Philipp
>
> Thanks,
>
> tglx
>
|