[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BN9PR11MB527604DE2A881FF615B7D0748C0C9@BN9PR11MB5276.namprd11.prod.outlook.com>
Date: Wed, 23 Nov 2022 08:02:46 +0000
From: "Tian, Kevin" <kevin.tian@...el.com>
To: Thomas Gleixner <tglx@...utronix.de>,
LKML <linux-kernel@...r.kernel.org>
CC: "x86@...nel.org" <x86@...nel.org>, Joerg Roedel <joro@...tes.org>,
"Will Deacon" <will@...nel.org>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>,
"Lorenzo Pieralisi" <lorenzo.pieralisi@....com>,
Marc Zyngier <maz@...nel.org>,
"Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
Jason Gunthorpe <jgg@...lanox.com>,
"Jiang, Dave" <dave.jiang@...el.com>,
Alex Williamson <alex.williamson@...hat.com>,
"Williams, Dan J" <dan.j.williams@...el.com>,
Logan Gunthorpe <logang@...tatee.com>,
"Raj, Ashok" <ashok.raj@...el.com>, Jon Mason <jdmason@...zu.us>,
Allen Hubbe <allenbh@...il.com>
Subject: RE: [patch V2 07/33] genirq/msi: Provide
msi_create/free_device_irq_domain()
> From: Thomas Gleixner <tglx@...utronix.de>
> Sent: Monday, November 21, 2022 10:38 PM
>
>
> +static inline void msi_remove_device_irqdomains(struct device *dev, struct
> msi_device_data *md)
> +{
'md' is unused
>
> +/**
> + * msi_create_device_irq_domain - Create a device MSI interrupt domain
> + * @dev: Pointer to the device
> + * @domid: Domain id
> + * @template: MSI domain info bundle used as template
> + * @hwsize: Maximum number of MSI table entries (0 if unknown
> or unlimited)
> + * @domain_data: Optional pointer to domain specific data which is set
> in
> + * msi_domain_info::data
> + * @chip_data: Optional pointer to chip specific data which is
> set in
> + * msi_domain_info::chip_data
> + *
> + * Return: True on success, false otherwise
Can you elaborate why boolean type is selected instead of returning the
actual error codes? the outmost callers are all new functions:
pci_setup_msi[x]_device_domain()
pci_create_ims_domain()
I didn't find out any legacy convention forcing this way...
> + bundle = kmemdup(template, sizeof(*bundle), GFP_KERNEL);
> + if (!bundle)
> + return false;
> +
> + bundle->info.hwsize = hwsize ? hwsize : MSI_MAX_INDEX;
patch04 marks that hwsize being 0 means unknown or unlimited in the
header file.
but here info.hwsize always gets a value i.e. the meaning of 0 only exists
in this function. What about removing the trailing words about 0 in
patch04?
- + * @hwsize: The hardware table size (0 if unknown/unlimited)
+ + * @hwsize: The hardware table size
Powered by blists - more mailing lists