PCI/P2PDMA: Rename upstream_bridge_distance() and rework doc
authorLogan Gunthorpe <logang@deltatee.com>
Thu, 10 Jun 2021 16:06:04 +0000 (10:06 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 10 Jun 2021 23:01:24 +0000 (18:01 -0500)
commit6389d43745228de128e7b1a66eb18c0ccf43e6b4
tree712e75d76def6ae0647b39ab7a38afb5ced3e76d
parent6efb943b8616ec53a5e444193dccf1af9ad627b5
PCI/P2PDMA: Rename upstream_bridge_distance() and rework doc

The function upstream_bridge_distance() has evolved such that its name is
no longer entirely reflective of what the function does.  It not only
calculates the distance between two peers but also calculates how the DMA
addresses for those two peers should be mapped.

Rename it to calc_map_type_and_dist() and rework the documentation to
better describe the two pieces of information the function returns.

[bhelgaas: tweak comment wording]
Link: https://lore.kernel.org/r/20210610160609.28447-2-logang@deltatee.com
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/p2pdma.c