Messages in this thread | | | From | "Tian, Kevin" <> | Subject | RE: [patch V2 07/33] genirq/msi: Provide msi_create/free_device_irq_domain() | Date | Wed, 23 Nov 2022 08:02:46 +0000 |
| |
> From: Thomas Gleixner <tglx@linutronix.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
| |