[PATCH v2 3/6] PCI: endpoint: cleanup get_msi() callback
Damien Le Moal
dlemoal at kernel.org
Tue May 13 23:35:10 PDT 2025
On 5/13/25 16:30, Niklas Cassel wrote:
> The kdoc for pci_epc_get_msi() says:
> "Invoke to get the number of MSI interrupts allocated by the RC"
> the kdoc for the callback pci_epc_ops->get_msi() says:
> "ops to get the number of MSI interrupts allocated by the RC from
> the MSI capability register"
>
> pci_epc_ops->get_msi() does however return the number of interrupts
> in the encoding as defined by the MME Multiple Message Enable field.
>
> Nowhere in the kdoc does it say that the returned number of interrupts
> is in MME encoding.
>
> Thus, it is very confusing that the wrapper function (pci_epc_get_msi())
> and the callback function (pci_epc_ops->get_msi()) don't return the same
> value.
>
> Cleanup the API so that the wrapper function and the callback function
> will have the same semantics.
Nit: please mention which semantic this patch changes the API to use, that is,
to follow the kdoc and return the number of interrupts, regardless of the
internal encoding of that value.
Other than that, looks good to me.
Reviewed-by: Damien Le Moal <dlemoal at kernel.org>]
--
Damien Le Moal
Western Digital Research
More information about the Linux-rockchip
mailing list