Re: [PATCH v2] PCI: Expand documentation for pci_add_dma_alias()

From: Logan Gunthorpe
Date: Thu May 24 2018 - 12:58:37 EST




On 24/05/18 11:44 AM, Randy Dunlap wrote:
>> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
>> index dbfe7c4f3776..1c0c1ea23b90 100644
>> --- a/drivers/pci/pci.c
>> +++ b/drivers/pci/pci.c
>> @@ -5395,8 +5395,19 @@ int pci_set_vga_state(struct pci_dev *dev, bool decode,
>> * @dev: the PCI device for which alias is added
>> * @devfn: alias slot and function
>> *
>> - * This helper encodes 8-bit devfn as bit number in dma_alias_mask.
>> - * It should be called early, preferably as PCI fixup header quirk.
>> + * This helper encodes an 8-bit devfn as a bit number in dma_alias_mask
>> + * which is used to program permissible BDF source addresses for DMA
>
> It took me a few seconds to decode BDF. FWIW, I would prefer to see
> bus-devfn or bus-dev-fn or bus-dev-func or bus-dev-function.

Yes, there's a lot of overlapping terminology here. In circles I've
discussed this stuff, BDF is a common acronym. The kernel uses
Bus/Slot/Function in some places, but devfn is also common. In any case,
I like bus-devfn so I'll make these changes and send a v3 shortly.

Thanks,

Logan