PCI: Add pci_rebar_bytes_to_size()
authorNirmoy Das <nirmoy.das@amd.com>
Thu, 7 Jan 2021 13:30:34 +0000 (14:30 +0100)
committerChristian König <christian.koenig@amd.com>
Thu, 14 Jan 2021 20:20:53 +0000 (21:20 +0100)
commit192f1bf7559e895d51f81c3976c5892c8b1e0601
tree774d70f805d73251f4b154b033f0d860936b4d8e
parent8fbdbb66f8c10bb359ad20fff95628e5deac88f4
PCI: Add pci_rebar_bytes_to_size()

Users of pci_resize_resource() need a way to calculate BAR size
from desired bytes. Add a helper function and export it so that
modular drivers can use it.

Signed-off-by: Darren Salt <devspam@moreofthesa.me.uk>
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patchwork.kernel.org/project/dri-devel/patch/20210107175017.15893-3-nirmoy.das@amd.com
drivers/pci/pci.c
include/linux/pci.h