Skip to content

Commit 9357e32

Browse files
committed
genirq/msi: Rename msi_[un]lock_descs()
Now that all abuse is gone and the legit users are converted to guard(msi_descs_lock), rename the lock functions and document them as internal. No functional change. Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Link: https://lore.kernel.org/all/[email protected]
1 parent e46a28c commit 9357e32

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

include/linux/msi.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,11 @@ struct msi_dev_domain {
229229

230230
int msi_setup_device_data(struct device *dev);
231231

232-
void msi_lock_descs(struct device *dev);
233-
void msi_unlock_descs(struct device *dev);
232+
void __msi_lock_descs(struct device *dev);
233+
void __msi_unlock_descs(struct device *dev);
234234

235-
DEFINE_LOCK_GUARD_1(msi_descs_lock, struct device, msi_lock_descs(_T->lock),
236-
msi_unlock_descs(_T->lock));
235+
DEFINE_LOCK_GUARD_1(msi_descs_lock, struct device, __msi_lock_descs(_T->lock),
236+
__msi_unlock_descs(_T->lock));
237237

238238
struct msi_desc *msi_domain_first_desc(struct device *dev, unsigned int domid,
239239
enum msi_desc_filter filter);

kernel/irq/msi.c

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -343,26 +343,30 @@ int msi_setup_device_data(struct device *dev)
343343
}
344344

345345
/**
346-
* msi_lock_descs - Lock the MSI descriptor storage of a device
346+
* __msi_lock_descs - Lock the MSI descriptor storage of a device
347347
* @dev: Device to operate on
348+
*
349+
* Internal function for guard(msi_descs_lock). Don't use in code.
348350
*/
349-
void msi_lock_descs(struct device *dev)
351+
void __msi_lock_descs(struct device *dev)
350352
{
351353
mutex_lock(&dev->msi.data->mutex);
352354
}
353-
EXPORT_SYMBOL_GPL(msi_lock_descs);
355+
EXPORT_SYMBOL_GPL(__msi_lock_descs);
354356

355357
/**
356-
* msi_unlock_descs - Unlock the MSI descriptor storage of a device
358+
* __msi_unlock_descs - Unlock the MSI descriptor storage of a device
357359
* @dev: Device to operate on
360+
*
361+
* Internal function for guard(msi_descs_lock). Don't use in code.
358362
*/
359-
void msi_unlock_descs(struct device *dev)
363+
void __msi_unlock_descs(struct device *dev)
360364
{
361365
/* Invalidate the index which was cached by the iterator */
362366
dev->msi.data->__iter_idx = MSI_XA_MAX_INDEX;
363367
mutex_unlock(&dev->msi.data->mutex);
364368
}
365-
EXPORT_SYMBOL_GPL(msi_unlock_descs);
369+
EXPORT_SYMBOL_GPL(__msi_unlock_descs);
366370

367371
static struct msi_desc *msi_find_desc(struct msi_device_data *md, unsigned int domid,
368372
enum msi_desc_filter filter)

0 commit comments

Comments
 (0)