Skip to content

Commit

Permalink
genirq/msi: Rename msi_add_msi_desc() to msi_insert_msi_desc()
Browse files Browse the repository at this point in the history
This reflects the functionality better. No functional change.

Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Jason Gunthorpe <[email protected]>
Reviewed-by: Kevin Tian <[email protected]>
Acked-by: Marc Zyngier <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
KAGA-KOKO committed Dec 5, 2022
1 parent 9804370 commit 1c89396
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions drivers/pci/msi/msi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions drivers/soc/ti/ti_sci_inta_msi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
2 changes: 1 addition & 1 deletion include/linux/msi.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

/**
Expand Down
6 changes: 4 additions & 2 deletions kernel/irq/msi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 1c89396

Please sign in to comment.