genirq/msi: Rename msi_add_msi_desc() to msi_insert_msi_desc()

This reflects the functionality better. No functional change.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Acked-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20221124230314.103554618@linutronix.de
This commit is contained in:
Thomas Gleixner 2022-11-25 00:24:27 +01:00
parent 98043704f3
commit 1c89396300
4 changed files with 9 additions and 7 deletions

View File

@ -308,7 +308,7 @@ static int msi_setup_msi_desc(struct pci_dev *dev, int nvec,
if (desc.pci.msi_attrib.can_mask)
pci_read_config_dword(dev, desc.pci.mask_pos, &desc.pci.msi_mask);
return msi_add_msi_desc(&dev->dev, &desc);
return msi_insert_msi_desc(&dev->dev, &desc);
}
static int msi_verify_entries(struct pci_dev *dev)
@ -591,7 +591,7 @@ static int msix_setup_msi_descs(struct pci_dev *dev, void __iomem *base,
desc.pci.msix_ctrl = readl(addr + PCI_MSIX_ENTRY_VECTOR_CTRL);
}
ret = msi_add_msi_desc(&dev->dev, &desc);
ret = msi_insert_msi_desc(&dev->dev, &desc);
if (ret)
break;
}

View File

@ -73,13 +73,13 @@ static int ti_sci_inta_msi_alloc_descs(struct device *dev,
for (set = 0; set < res->sets; set++) {
for (i = 0; i < res->desc[set].num; i++, count++) {
msi_desc.msi_index = res->desc[set].start + i;
if (msi_add_msi_desc(dev, &msi_desc))
if (msi_insert_msi_desc(dev, &msi_desc))
goto fail;
}
for (i = 0; i < res->desc[set].num_sec; i++, count++) {
msi_desc.msi_index = res->desc[set].start_sec + i;
if (msi_add_msi_desc(dev, &msi_desc))
if (msi_insert_msi_desc(dev, &msi_desc))
goto fail;
}
}

View File

@ -286,7 +286,7 @@ static inline void msi_desc_set_iommu_cookie(struct msi_desc *desc,
}
#endif
int msi_add_msi_desc(struct device *dev, struct msi_desc *init_desc);
int msi_insert_msi_desc(struct device *dev, struct msi_desc *init_desc);
void msi_free_msi_descs_range(struct device *dev, unsigned int first_index, unsigned int last_index);
/**

View File

@ -77,13 +77,15 @@ static int msi_insert_desc(struct msi_device_data *md, struct msi_desc *desc, un
}
/**
* msi_add_msi_desc - Allocate and initialize a MSI descriptor
* msi_insert_msi_desc - Allocate and initialize a MSI descriptor and
* insert it at @init_desc->msi_index
*
* @dev: Pointer to the device for which the descriptor is allocated
* @init_desc: Pointer to an MSI descriptor to initialize the new descriptor
*
* Return: 0 on success or an appropriate failure code.
*/
int msi_add_msi_desc(struct device *dev, struct msi_desc *init_desc)
int msi_insert_msi_desc(struct device *dev, struct msi_desc *init_desc)
{
struct msi_desc *desc;