PCI: endpoint: pci-epf-test: Remove superfluous code
The only reason why we call pci_epf_configure_bar() is to set PCI_BASE_ADDRESS_MEM_TYPE_64 in case the hardware requires it. However, this flag is now automatically set when allocating a BAR that can only be a 64-bit BAR, so we can drop pci_epf_configure_bar() completely. Link: https://lore.kernel.org/linux-pci/20240320113157.322695-4-cassel@kernel.org Signed-off-by: Niklas Cassel <cassel@kernel.org> Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
This commit is contained in:
parent
29a025b6fb
commit
828e870431
@ -867,19 +867,6 @@ static int pci_epf_test_alloc_space(struct pci_epf *epf)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void pci_epf_configure_bar(struct pci_epf *epf,
|
||||
const struct pci_epc_features *epc_features)
|
||||
{
|
||||
struct pci_epf_bar *epf_bar;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < PCI_STD_NUM_BARS; i++) {
|
||||
epf_bar = &epf->bar[i];
|
||||
if (epc_features->bar[i].only_64bit)
|
||||
epf_bar->flags |= PCI_BASE_ADDRESS_MEM_TYPE_64;
|
||||
}
|
||||
}
|
||||
|
||||
static int pci_epf_test_bind(struct pci_epf *epf)
|
||||
{
|
||||
int ret;
|
||||
@ -904,7 +891,6 @@ static int pci_epf_test_bind(struct pci_epf *epf)
|
||||
test_reg_bar = pci_epc_get_first_free_bar(epc_features);
|
||||
if (test_reg_bar < 0)
|
||||
return -EINVAL;
|
||||
pci_epf_configure_bar(epf, epc_features);
|
||||
|
||||
epf_test->test_reg_bar = test_reg_bar;
|
||||
epf_test->epc_features = epc_features;
|
||||
|
Loading…
x
Reference in New Issue
Block a user