Skip to content

Commit 5376252

Browse files
committed
genirq/msi: Make a few functions static
None of these functions are used outside of the MSI core. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250309084110.204054172@linutronix.de
1 parent 01499ae commit 5376252

2 files changed

Lines changed: 7 additions & 38 deletions

File tree

include/linux/msi.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ struct device_attribute;
8181
struct irq_domain;
8282
struct irq_affinity_desc;
8383

84-
void __get_cached_msi_msg(struct msi_desc *entry, struct msi_msg *msg);
8584
#ifdef CONFIG_GENERIC_MSI_IRQ
8685
void get_cached_msi_msg(unsigned int irq, struct msi_msg *msg);
8786
#else
@@ -603,8 +602,6 @@ void msi_remove_device_irq_domain(struct device *dev, unsigned int domid);
603602
bool msi_match_device_irq_domain(struct device *dev, unsigned int domid,
604603
enum irq_domain_bus_token bus_token);
605604

606-
int msi_domain_alloc_irqs_range_locked(struct device *dev, unsigned int domid,
607-
unsigned int first, unsigned int last);
608605
int msi_domain_alloc_irqs_range(struct device *dev, unsigned int domid,
609606
unsigned int first, unsigned int last);
610607
int msi_domain_alloc_irqs_all_locked(struct device *dev, unsigned int domid, int nirqs);
@@ -613,8 +610,6 @@ struct msi_map msi_domain_alloc_irq_at(struct device *dev, unsigned int domid, u
613610
const struct irq_affinity_desc *affdesc,
614611
union msi_instance_cookie *cookie);
615612

616-
void msi_domain_free_irqs_range_locked(struct device *dev, unsigned int domid,
617-
unsigned int first, unsigned int last);
618613
void msi_domain_free_irqs_range(struct device *dev, unsigned int domid,
619614
unsigned int first, unsigned int last);
620615
void msi_domain_free_irqs_all_locked(struct device *dev, unsigned int domid);

kernel/irq/msi.c

Lines changed: 7 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -270,16 +270,11 @@ static int msi_domain_add_simple_msi_descs(struct device *dev, struct msi_ctrl *
270270
return ret;
271271
}
272272

273-
void __get_cached_msi_msg(struct msi_desc *entry, struct msi_msg *msg)
274-
{
275-
*msg = entry->msg;
276-
}
277-
278273
void get_cached_msi_msg(unsigned int irq, struct msi_msg *msg)
279274
{
280275
struct msi_desc *entry = irq_get_msi_desc(irq);
281276

282-
__get_cached_msi_msg(entry, msg);
277+
*msg = entry->msg;
283278
}
284279
EXPORT_SYMBOL_GPL(get_cached_msi_msg);
285280

@@ -1352,49 +1347,28 @@ static int msi_domain_alloc_locked(struct device *dev, struct msi_ctrl *ctrl)
13521347
}
13531348

13541349
/**
1355-
* msi_domain_alloc_irqs_range_locked - Allocate interrupts from a MSI interrupt domain
1350+
* msi_domain_alloc_irqs_range - Allocate interrupts from a MSI interrupt domain
13561351
* @dev: Pointer to device struct of the device for which the interrupts
13571352
* are allocated
13581353
* @domid: Id of the interrupt domain to operate on
13591354
* @first: First index to allocate (inclusive)
13601355
* @last: Last index to allocate (inclusive)
13611356
*
1362-
* Must be invoked from within a msi_lock_descs() / msi_unlock_descs()
1363-
* pair. Use this for MSI irqdomains which implement their own descriptor
1364-
* allocation/free.
1365-
*
13661357
* Return: %0 on success or an error code.
13671358
*/
1368-
int msi_domain_alloc_irqs_range_locked(struct device *dev, unsigned int domid,
1369-
unsigned int first, unsigned int last)
1359+
int msi_domain_alloc_irqs_range(struct device *dev, unsigned int domid,
1360+
unsigned int first, unsigned int last)
13701361
{
13711362
struct msi_ctrl ctrl = {
13721363
.domid = domid,
13731364
.first = first,
13741365
.last = last,
13751366
.nirqs = last + 1 - first,
13761367
};
1377-
1378-
return msi_domain_alloc_locked(dev, &ctrl);
1379-
}
1380-
1381-
/**
1382-
* msi_domain_alloc_irqs_range - Allocate interrupts from a MSI interrupt domain
1383-
* @dev: Pointer to device struct of the device for which the interrupts
1384-
* are allocated
1385-
* @domid: Id of the interrupt domain to operate on
1386-
* @first: First index to allocate (inclusive)
1387-
* @last: Last index to allocate (inclusive)
1388-
*
1389-
* Return: %0 on success or an error code.
1390-
*/
1391-
int msi_domain_alloc_irqs_range(struct device *dev, unsigned int domid,
1392-
unsigned int first, unsigned int last)
1393-
{
13941368
int ret;
13951369

13961370
msi_lock_descs(dev);
1397-
ret = msi_domain_alloc_irqs_range_locked(dev, domid, first, last);
1371+
ret = msi_domain_alloc_locked(dev, &ctrl);
13981372
msi_unlock_descs(dev);
13991373
return ret;
14001374
}
@@ -1618,8 +1592,8 @@ static void msi_domain_free_locked(struct device *dev, struct msi_ctrl *ctrl)
16181592
* @first: First index to free (inclusive)
16191593
* @last: Last index to free (inclusive)
16201594
*/
1621-
void msi_domain_free_irqs_range_locked(struct device *dev, unsigned int domid,
1622-
unsigned int first, unsigned int last)
1595+
static void msi_domain_free_irqs_range_locked(struct device *dev, unsigned int domid,
1596+
unsigned int first, unsigned int last)
16231597
{
16241598
struct msi_ctrl ctrl = {
16251599
.domid = domid,

0 commit comments

Comments
 (0)