Messages in this thread | | | From | Thomas Gleixner <> | Subject | Re: [patch 07/32] genirq/msi: Count the allocated MSI descriptors | Date | Sat, 27 Nov 2021 20:22:26 +0100 |
| |
On Sat, Nov 27 2021 at 13:19, Greg Kroah-Hartman wrote: > On Sat, Nov 27, 2021 at 02:22:38AM +0100, Thomas Gleixner wrote: >> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> > > No changelog?
Bah. This one should not be there at all.
> Anyway, why do we care about the number of decriptors? >> +/** >> + * msi_device_num_descs - Query the number of allocated MSI descriptors of a device >> + * @dev: The device to read from >> + * >> + * Note: This is a lockless snapshot of msi_device_data::num_descs >> + * >> + * Returns the number of MSI descriptors which are allocated for @dev >> + */ >> +unsigned int msi_device_num_descs(struct device *dev) >> +{ >> + if (dev->msi.data) >> + return dev->msi.data->num_descs; > > As this number can change after it is read, what will callers do with > it?
I wanted to get rid of this, but then forgot. Getting old.
Thanks,
tglx
| |