Re: [PATCH v2 3/6] PCI: endpoint: cleanup get_msi() callback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>]

-- 
Damien Le Moal
Western Digital Research




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux