Skip to content

Commit 8327df4

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 fc87dd5 commit 8327df4

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
@@ -224,11 +224,11 @@ struct msi_dev_domain {
224224

225225
int msi_setup_device_data(struct device *dev);
226226

227-
void msi_lock_descs(struct device *dev);
228-
void msi_unlock_descs(struct device *dev);
227+
void __msi_lock_descs(struct device *dev);
228+
void __msi_unlock_descs(struct device *dev);
229229

230-
DEFINE_LOCK_GUARD_1(msi_descs_lock, struct device, msi_lock_descs(_T->lock),
231-
msi_unlock_descs(_T->lock));
230+
DEFINE_LOCK_GUARD_1(msi_descs_lock, struct device, __msi_lock_descs(_T->lock),
231+
__msi_unlock_descs(_T->lock));
232232

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

kernel/irq/msi.c

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

340340
/**
341-
* msi_lock_descs - Lock the MSI descriptor storage of a device
341+
* __msi_lock_descs - Lock the MSI descriptor storage of a device
342342
* @dev: Device to operate on
343+
*
344+
* Internal function for guard(msi_descs_lock). Don't use in code.
343345
*/
344-
void msi_lock_descs(struct device *dev)
346+
void __msi_lock_descs(struct device *dev)
345347
{
346348
mutex_lock(&dev->msi.data->mutex);
347349
}
348-
EXPORT_SYMBOL_GPL(msi_lock_descs);
350+
EXPORT_SYMBOL_GPL(__msi_lock_descs);
349351

350352
/**
351-
* msi_unlock_descs - Unlock the MSI descriptor storage of a device
353+
* __msi_unlock_descs - Unlock the MSI descriptor storage of a device
352354
* @dev: Device to operate on
355+
*
356+
* Internal function for guard(msi_descs_lock). Don't use in code.
353357
*/
354-
void msi_unlock_descs(struct device *dev)
358+
void __msi_unlock_descs(struct device *dev)
355359
{
356360
/* Invalidate the index which was cached by the iterator */
357361
dev->msi.data->__iter_idx = MSI_XA_MAX_INDEX;
358362
mutex_unlock(&dev->msi.data->mutex);
359363
}
360-
EXPORT_SYMBOL_GPL(msi_unlock_descs);
364+
EXPORT_SYMBOL_GPL(__msi_unlock_descs);
361365

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

0 commit comments

Comments
 (0)